From bedf024ef5f150dabdb7ea37a71ed030c4445941 Mon Sep 17 00:00:00 2001 From: Nick Berard Date: Thu, 16 Aug 2007 19:30:16 +0000 Subject: [PATCH] Documented all options git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@241344 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../sockets/functions/socket-get-option.xml | 102 +++++++++++++++--- 1 file changed, 86 insertions(+), 16 deletions(-) diff --git a/reference/sockets/functions/socket-get-option.xml b/reference/sockets/functions/socket-get-option.xml index 6b9ae51ca7..3a1f68939e 100644 --- a/reference/sockets/functions/socket-get-option.xml +++ b/reference/sockets/functions/socket-get-option.xml @@ -1,5 +1,5 @@ - + socket_get_option @@ -52,11 +52,12 @@ Available Socket Options - + Option Description + Type @@ -65,11 +66,8 @@ Reports whether debugging information is being recorded. - - - SO_ACCEPTCONN - Reports whether socket listening is enabled. + int @@ -77,12 +75,18 @@ Reports whether transmission of broadcast messages is supported. + + int + SO_REUSEADDR Reports whether local addresses can be reused. + + int + SO_KEEPALIVE @@ -92,11 +96,40 @@ the connection is broken and processes writing to that socket are notified with a SIGPIPE signal. + + int + SO_LINGER - Reports whether the socket lingers on socket_close if data is present. + + Reports whether the socket lingers on + socket_close if data is present. By default, + when the socket is closed, it attempts to send all unsent data. + In the case of a connection-oriented socket, + socket_close will wait for its peer to + acknowledge the data. + + + If l_onoff is non-zero and + l_linger is zero, all the + unsent data will be discarded and RST (reset) is sent to the + peer in the case of a connection-oriented socket. + + + On the other hand, if l_onoff is + non-zero and l_linger is non-zero, + socket_close will block until all the data + is sent or the time specified in l_linger + elapses. If the socket is non-blocking, + socket_close will fail and return an error. + + + + array. The array will contain two keys: + l_onoff and + l_linger. @@ -104,29 +137,45 @@ Reports whether the socket leaves out-of-band data inline. + + int + SO_SNDBUF - Reports send buffer size information. + Reports the size of the send buffer. + + int + SO_RCVBUF - Reports recieve buffer size information. + Reports the size of the receive buffer. + + int + SO_ERROR Reports information about error status and clears it. + + int (cannot be set by socket_set_option) + SO_TYPE - Reports the socket type. + Reports the socket type (e.g. + SOCK_STREAM). + + + int (cannot be set by socket_set_option) @@ -134,12 +183,18 @@ Reports whether outgoing messages bypass the standard routing facilities. + + int + SO_RCVLOWAT - Reports the minimum number of bytes to process for socket input operations. - ( Defaults to 1 ) + Reports the minimum number of bytes to process for socket + input operations. + + + int @@ -147,11 +202,11 @@ Reports the timeout value for input operations. - - - SO_SNDLOWAT - Reports the minimum number of bytes to process for socket output operations. + array. The array will contain two keys: + sec which is the seconds part on the timeout + value and usec which is the microsecond part + of the timeout value. @@ -160,6 +215,21 @@ Reports the timeout value specifying the amount of time that an output function blocks because flow control prevents data from being sent. + + array. The array will contain two keys: + sec which is the seconds part on the timeout + value and usec which is the microsecond part + of the timeout value. + + + + SO_SNDLOWAT + + Reports the minimum number of bytes to process for socket output operations. + + + int +