- Initial documentation.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@80717 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Markus Fischer 2002-05-01 09:30:47 +00:00
parent 5e5c4b6ded
commit 5ccc50311d

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.27 -->
<refentry id="function.socket-create-listen">
<refnamediv>
@ -15,7 +15,42 @@
</methodsynopsis>
&warn.experimental.func;
<para>
&warn.undocumented.func;
This function is meant to ease the task of creating a new socket which
only listens to accept new connections.
</para>
<para>
<function>socket_create_listen</function> create a new socket resource of
type <constant>AF_INET</constant> listening on <emphasis>all</emphasis>
local interfaces on the given port waiting for new connections.
</para>
<para>
The <parameter>backlog</parameter> parameter defines the maximum length
the queue of pending connections may grow to.
<constant>SOMAXCONN</constant> may be passed as
<parameter>backlog</parameter> parameter, see
<function>socket_listen</function> for more information.
</para>
<para>
<function>socket_create_listen</function> returns a new socket resource
on success or &false; on error. The error code can be retrieved with
<function>socket_last_error</function>. This code may be passed to
<function>socket_strerror</function> to get a textual explanation of the
error.
</para>
<note>
<para>
If you want to create a socket which only listens on a certain
interfaces you need to use <function>socket_create</function>,
<function>socket_bind</function> and <function>socket_listen</function>.
</para>
</note>
<para>
See also
<function>socket_create</function>,
<function>socket_bind</function>,
<function>socket_listen</function>,
<function>socket_last_error</function> and
<function>socket_strerror</function>.
</para>
</refsect1>
</refentry>