derek Thu Jan 29 13:05:50 2004 EDT
Modified files:
/phpdoc/en/reference/sockets/functions socket-set-nonblock.xml
Log:
Adding Documentation
http://cvs.php.net/diff.php/phpdoc/en/reference/sockets/functions/socket-set-nonblock.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc/en/reference/sockets/functions/socket-set-nonblock.xml
diff -u phpdoc/en/reference/sockets/functions/socket-set-nonblock.xml:1.3
phpdoc/en/reference/sockets/functions/socket-set-nonblock.xml:1.4
--- phpdoc/en/reference/sockets/functions/socket-set-nonblock.xml:1.3 Sun Dec 14
14:24:35 2003
+++ phpdoc/en/reference/sockets/functions/socket-set-nonblock.xml Thu Jan 29
13:05:50 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 -->
<refentry id="function.socket-set-nonblock">
<refnamediv>
@@ -14,7 +14,32 @@
</methodsynopsis>
&warn.experimental.func;
<para>
- &warn.undocumented.func;
+ The <function>socket_set_nonblock</function> function sets the O_NONBLOCK flag
+ on the socket specified by the <parameter>socket</parameter> parameter.
+ </para>
+ <para>
+ <example>
+ <title><function>socket_set_nonblock</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$port = 9090;
+if(! $socket = socket_create_listen( $port ) )
+{
+ echo socket_strerror( socket_last_error( ) );
+}
+if(! socket_set_option( $socket, SOL_SOCKET, SO_REUSEADDR, 1 ) )
+{
+ echo socket_strerror( socket_last_error( ) );
+}
+if(! socket_set_nonblock( $socket ) )
+{
+ echo socket_strerror( socket_last_error( ) );
+}
+?>
+]]>
+ </programlisting>
+ </example>
</para>
<para>
&return.success;