Bug 1885489 - Part 9: Add SnapshotIterator::readObject(). r=iain
[gecko.git] / docs / nspr / reference / pr_shutdown.rst
blobfaee7dfe15f15cf669a0ed7e6bee06877d4f3119
1 PR_Shutdown
2 ===========
4 Shuts down part of a full-duplex connection on a specified socket.
7 Syntax
8 ------
10 .. code::
12    #include <prio.h>
14    PRStatus PR_Shutdown(
15      PRFileDesc *fd,
16      PRShutdownHow how);
19 Parameters
20 ~~~~~~~~~~
22 The function has the following parameters:
24 ``fd``
25    A pointer to a :ref:`PRFileDesc` object representing a connected socket.
26 ``how``
27    The kind of disallowed operations on the socket. Possible values
28    include the following:
30     - :ref:`PR_SHUTDOWN_RCV`. Further receives will be disallowed.
31     - :ref:`PR_SHUTDOWN_SEND`. Further sends will be disallowed.
32     - :ref:`PR_SHUTDOWN_BOTH`. Further sends and receives will be
33       disallowed.
36 Returns
37 ~~~~~~~
39 The function returns one of the following values:
41 -  Upon successful completion of shutdown request, ``PR_SUCCESS``.
42 -  If unsuccessful, ``PR_FAILURE``. Further information can be obtained
43    by calling :ref:`PR_GetError`.
46 Description
47 -----------
49 The ``PRShutdownHow`` enumeration is defined as follows:
51 .. code::
53    typedef enum PRShutdownHow{
54      PR_SHUTDOWN_RCV = 0,
55      PR_SHUTDOWN_SEND = 1,
56      PR_SHUTDOWN_BOTH = 2
57    } PRShutdownHow;