pr_getsocketoption.rst (888B)
1 PR_GetSocketOption 2 ================== 3 4 Retrieves the socket options set for a specified socket. 5 6 7 Syntax 8 ------ 9 10 .. code:: 11 12 #include <prio.h> 13 14 PRStatus PR_GetSocketOption( 15 PRFileDesc *fd, 16 PRSocketOptionData *data); 17 18 19 Parameters 20 ~~~~~~~~~~ 21 22 The function has the following parameters: 23 24 ``fd`` 25 A pointer to a :ref:`PRFileDesc` object representing the socket whose 26 options are to be retrieved. 27 ``data`` 28 A pointer to a structure of type :ref:`PRSocketOptionData`. On input, 29 the ``option`` field of this structure must be set to indicate which 30 socket option to retrieve for the socket represented by the ``fd`` 31 parameter. On output, this structure contains the requested socket 32 option data. 33 34 35 Returns 36 ~~~~~~~ 37 38 - If successful, ``PR_SUCCESS``. 39 - If unsuccessful, ``PR_FAILURE``. The reason for the failure can be 40 obtained by calling :ref:`PR_GetError`.