reference/sockets/functions/socket-create-listen.xml
db22a7cfcbc3af221f67e228336ac3e2d62aaf2c
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-create-listen">
3
+
<refentry xml:id="function.socket-create-listen" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>socket_create_listen</refname>
6
6
<refpurpose>Opens a socket on port to accept connections </refpurpose>
...
...
@@ -9,12 +9,12 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>resource</type><methodname>socket_create_listen</methodname>
12
+
<type class="union"><type>Socket</type><type>false</type></type><methodname>socket_create_listen</methodname>
13
13
<methodparam><type>int</type><parameter>port</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter>backlog</parameter><initializer>128</initializer></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter>backlog</parameter><initializer><constant>SOMAXCONN</constant></initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
<function>socket_create_listen</function> creates a new socket resource of
17
+
<function>socket_create_listen</function> creates a new <classname>Socket</classname> instance of
18
18
type <constant>AF_INET</constant> listening on <emphasis>all</emphasis>
19
19
local interfaces on the given port waiting for new connections.
20
20
</para>
...
...
@@ -55,7 +55,7 @@
55
55
<refsect1 role="returnvalues">
56
56
&reftitle.returnvalues;
57
57
<para>
58
-
<function>socket_create_listen</function> returns a new socket resource
58
+
<function>socket_create_listen</function> returns a new <classname>Socket</classname> instance
59
59
on success or &false; on error. The error code can be retrieved with
60
60
<function>socket_last_error</function>. This code may be passed to
61
61
<function>socket_strerror</function> to get a textual explanation of the
...
...
@@ -63,6 +63,29 @@
63
63
</para>
64
64
</refsect1>
65
65

66
+
<refsect1 role="changelog">
67
+
&reftitle.changelog;
68
+
<informaltable>
69
+
<tgroup cols="2">
70
+
<thead>
71
+
<row>
72
+
<entry>&Version;</entry>
73
+
<entry>&Description;</entry>
74
+
</row>
75
+
</thead>
76
+
<tbody>
77
+
<row>
78
+
<entry>8.0.0</entry>
79
+
<entry>
80
+
On success, this function returns a <classname>Socket</classname> instance now;
81
+
previously, a <type>resource</type> was returned.
82
+
</entry>
83
+
</row>
84
+
</tbody>
85
+
</tgroup>
86
+
</informaltable>
87
+
</refsect1>
88
+

66
89
<refsect1 role="notes">
67
90
&reftitle.notes;
68
91
<note>
...
...
@@ -88,7 +111,6 @@
88
111
</para>
89
112
</refsect1>
90
113
</refentry>
91
-

92
114
<!-- Keep this comment at the end of the file
93
115
Local variables:
94
116
mode: sgml
95
117