Documented all options

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@241344 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nick Berard 2007-08-16 19:30:16 +00:00
parent 2fe80ab76e
commit bedf024ef5

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.12 $ -->
<!-- $Revision: 1.13 $ -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-get-option">
<refnamediv>
<refname>socket_get_option</refname>
@ -52,11 +52,12 @@
<listitem>
<table>
<title>Available Socket Options</title>
<tgroup cols="2">
<tgroup cols="3">
<thead>
<row>
<entry>Option</entry>
<entry>Description</entry>
<entry>Type</entry>
</row>
</thead>
<tbody>
@ -65,11 +66,8 @@
<entry>
Reports whether debugging information is being recorded.
</entry>
</row>
<row>
<entry>SO_ACCEPTCONN</entry>
<entry>
Reports whether socket listening is enabled.
<type>int</type>
</entry>
</row>
<row>
@ -77,12 +75,18 @@
<entry>
Reports whether transmission of broadcast messages is supported.
</entry>
<entry>
<type>int</type>
</entry>
</row>
<row>
<entry>SO_REUSEADDR</entry>
<entry>
Reports whether local addresses can be reused.
</entry>
<entry>
<type>int</type>
</entry>
</row>
<row>
<entry>SO_KEEPALIVE</entry>
@ -92,11 +96,40 @@
the connection is broken and processes writing to that socket are notified
with a SIGPIPE signal.
</entry>
<entry>
<type>int</type>
</entry>
</row>
<row>
<entry>SO_LINGER</entry>
<entry>
Reports whether the <parameter>socket</parameter> lingers on <function>socket_close</function> if data is present.
<para>
Reports whether the <parameter>socket</parameter> lingers on
<function>socket_close</function> 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,
<function>socket_close</function> will wait for its peer to
acknowledge the data.
</para>
<para>
If <structfield>l_onoff</structfield> is non-zero and
<structfield>l_linger</structfield> 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.
</para>
<para>
On the other hand, if <structfield>l_onoff</structfield> is
non-zero and <structfield>l_linger</structfield> is non-zero,
<function>socket_close</function> will block until all the data
is sent or the time specified in <structfield>l_linger</structfield>
elapses. If the socket is non-blocking,
<function>socket_close</function> will fail and return an error.
</para>
</entry>
<entry>
<type>array</type>. The array will contain two keys:
<structfield>l_onoff</structfield> and
<structfield>l_linger</structfield>.
</entry>
</row>
<row>
@ -104,29 +137,45 @@
<entry>
Reports whether the <parameter>socket</parameter> leaves out-of-band data inline.
</entry>
<entry>
<type>int</type>
</entry>
</row>
<row>
<entry>SO_SNDBUF</entry>
<entry>
Reports send buffer size information.
Reports the size of the send buffer.
</entry>
<entry>
<type>int</type>
</entry>
</row>
<row>
<entry>SO_RCVBUF</entry>
<entry>
Reports recieve buffer size information.
Reports the size of the receive buffer.
</entry>
<entry>
<type>int</type>
</entry>
</row>
<row>
<entry>SO_ERROR</entry>
<entry>
Reports information about error status and clears it.
</entry>
<entry>
<type>int</type> (cannot be set by <function>socket_set_option</function>)
</entry>
</row>
<row>
<entry>SO_TYPE</entry>
<entry>
Reports the <parameter>socket</parameter> type.
Reports the <parameter>socket</parameter> type (e.g.
<constant>SOCK_STREAM</constant>).
</entry>
<entry>
<type>int</type> (cannot be set by <function>socket_set_option</function>)
</entry>
</row>
<row>
@ -134,12 +183,18 @@
<entry>
Reports whether outgoing messages bypass the standard routing facilities.
</entry>
<entry>
<type>int</type>
</entry>
</row>
<row>
<entry>SO_RCVLOWAT</entry>
<entry>
Reports the minimum number of bytes to process for <parameter>socket</parameter> input operations.
( Defaults to 1 )
Reports the minimum number of bytes to process for <parameter>socket</parameter>
input operations.
</entry>
<entry>
<type>int</type>
</entry>
</row>
<row>
@ -147,11 +202,11 @@
<entry>
Reports the timeout value for input operations.
</entry>
</row>
<row>
<entry>SO_SNDLOWAT</entry>
<entry>
Reports the minimum number of bytes to process for <parameter>socket</parameter> output operations.
<type>array</type>. The array will contain two keys:
<structfield>sec</structfield> which is the seconds part on the timeout
value and <structfield>usec</structfield> which is the microsecond part
of the timeout value.
</entry>
</row>
<row>
@ -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.
</entry>
<entry>
<type>array</type>. The array will contain two keys:
<structfield>sec</structfield> which is the seconds part on the timeout
value and <structfield>usec</structfield> which is the microsecond part
of the timeout value.
</entry>
</row>
<row>
<entry>SO_SNDLOWAT</entry>
<entry>
Reports the minimum number of bytes to process for <parameter>socket</parameter> output operations.
</entry>
<entry>
<type>int</type>
</entry>
</row>
</tbody>
</tgroup>