pr_setsocketoption.rst (853B)
1 PR_SetSocketOption 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_SetSocketOption( 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 set. 27 ``data`` 28 A pointer to a structure of type :ref:`PRSocketOptionData` specifying 29 the options to set. 30 31 32 Returns 33 ~~~~~~~ 34 35 - If successful, ``PR_SUCCESS``. 36 - If unsuccessful, ``PR_FAILURE``. The reason for the failure can be 37 obtained by calling :ref:`PR_GetError`. 38 39 40 Description 41 ----------- 42 43 On input, the caller must set both the ``option`` and ``value`` fields 44 of the :ref:`PRSocketOptionData` object pointed to by the ``data`` 45 parameter.