prsockoption.rst (2035B)
1 PRSockOption 2 ============ 3 4 Enumeration type used in the ``option`` field of :ref:`PRSocketOptionData` 5 to form the name portion of a name-value pair. 6 7 8 Syntax 9 ------ 10 11 .. code:: 12 13 #include <prio.h> 14 15 typedef enum PRSockOption { 16 PR_SockOpt_Nonblocking, 17 PR_SockOpt_Linger, 18 PR_SockOpt_Reuseaddr, 19 PR_SockOpt_Keepalive, 20 PR_SockOpt_RecvBufferSize, 21 PR_SockOpt_SendBufferSize, 22 PR_SockOpt_IpTimeToLive, 23 PR_SockOpt_IpTypeOfService, 24 PR_SockOpt_AddMember, 25 PR_SockOpt_DropMember, 26 PR_SockOpt_McastInterface, 27 PR_SockOpt_McastTimeToLive, 28 PR_SockOpt_McastLoopback, 29 PR_SockOpt_NoDelay, 30 PR_SockOpt_MaxSegment, 31 PR_SockOpt_Last 32 } PRSockOption; 33 34 35 Enumerators 36 ~~~~~~~~~~~ 37 38 The enumeration has the following enumerators: 39 40 ``PR_SockOpt_Nonblocking`` 41 Nonblocking I/O. 42 ``PR_SockOpt_Linger`` 43 Time to linger on close if data is present in the socket send buffer. 44 ``PR_SockOpt_Reuseaddr`` 45 Allow local address reuse. 46 ``PR_SockOpt_Keepalive`` 47 Periodically test whether connection is still alive. 48 ``PR_SockOpt_RecvBufferSize`` 49 Receive buffer size. 50 ``PR_SockOpt_SendBufferSize`` 51 Send buffer size. 52 ``PR_SockOpt_IpTimeToLive`` 53 IP time-to-live. 54 ``PR_SockOpt_IpTypeOfService`` 55 IP type-of-service and precedence. 56 ``PR_SockOpt_AddMember`` 57 Join an IP multicast group. 58 ``PR_SockOpt_DropMember`` 59 Leave an IP multicast group. 60 ``PR_SockOpt_McastInterface`` 61 IP multicast interface address. 62 ``PR_SockOpt_McastTimeToLive`` 63 IP multicast time-to-live. 64 ``PR_SockOpt_McastLoopback`` 65 IP multicast loopback. 66 ``PR_SockOpt_NoDelay`` 67 Disable Nagle algorithm. Don't delay send to coalesce packets. 68 ``PR_SockOpt_MaxSegment`` 69 Maximum segment size. 70 ``PR_SockOpt_Last`` 71 Always one greater than the maximum valid socket option numerator. 72 73 74 Description 75 ----------- 76 77 The :ref:`PRSockOption` enumeration consists of all the socket options 78 supported by NSPR. The ``option`` field of :ref:`PRSocketOptionData` should 79 be set to an enumerator of type :ref:`PRSockOption`.