reference/stream/functions/stream-socket-server.xml
a1702b5d45ad950c5f7a077878378a37851a2df6
...
...
@@ -8,16 +8,16 @@
8
8
<refsect1 role="description">
9
9
&reftitle.description;
10
10
<methodsynopsis>
11
-
<type>resource</type><methodname>stream_socket_server</methodname>
12
-
<methodparam><type>string</type><parameter>local_socket</parameter></methodparam>
13
-
<methodparam choice="opt"><type>int</type><parameter role="reference">errno</parameter></methodparam>
14
-
<methodparam choice="opt"><type>string</type><parameter role="reference">errstr</parameter></methodparam>
11
+
<type class="union"><type>resource</type><type>false</type></type><methodname>stream_socket_server</methodname>
12
+
<methodparam><type>string</type><parameter>address</parameter></methodparam>
13
+
<methodparam choice="opt"><type>int</type><parameter role="reference">error_code</parameter><initializer>&null;</initializer></methodparam>
14
+
<methodparam choice="opt"><type>string</type><parameter role="reference">error_message</parameter><initializer>&null;</initializer></methodparam>
15
15
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>STREAM_SERVER_BIND | STREAM_SERVER_LISTEN</initializer></methodparam>
16
-
<methodparam choice="opt"><type>resource</type><parameter>context</parameter></methodparam>
16
+
<methodparam choice="opt"><type class="union"><type>resource</type><type>null</type></type><parameter>context</parameter><initializer>&null;</initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
Creates a stream or datagram socket on the specified
20
-
<parameter>local_socket</parameter>.
20
+
<parameter>address</parameter>.
21
21
</para>
22
22
<para>
23
23
This function only creates a socket, to begin accepting connections
...
...
@@ -30,7 +30,7 @@
30
30
<para>
31
31
<variablelist>
32
32
<varlistentry>
33
-
<term><parameter>local_socket</parameter></term>
33
+
<term><parameter>address</parameter></term>
34
34
<listitem>
35
35
<para>
36
36
The type of socket created is determined by the transport specified
...
...
@@ -53,27 +53,27 @@
53
53
</listitem>
54
54
</varlistentry>
55
55
<varlistentry>
56
-
<term><parameter>errno</parameter></term>
56
+
<term><parameter>error_code</parameter></term>
57
57
<listitem>
58
58
<para>
59
-
If the optional <parameter>errno</parameter> and <parameter>errstr</parameter>
59
+
If the optional <parameter>error_code</parameter> and <parameter>error_message</parameter>
60
60
arguments are present they will be set to indicate the actual system
61
61
level error that occurred in the system-level <literal>socket()</literal>,
62
62
<literal>bind()</literal>, and <literal>listen()</literal> calls. If
63
-
the value returned in <parameter>errno</parameter> is
63
+
the value returned in <parameter>error_code</parameter> is
64
64
<literal>0</literal> and the function returned &false;, it is an
65
65
indication that the error occurred before the <literal>bind()</literal>
66
66
call. This is most likely due to a problem initializing the socket.
67
-
Note that the <parameter>errno</parameter> and
68
-
<parameter>errstr</parameter> arguments will always be passed by reference.
67
+
Note that the <parameter>error_code</parameter> and
68
+
<parameter>error_message</parameter> arguments will always be passed by reference.
69
69
</para>
70
70
</listitem>
71
71
</varlistentry>
72
72
<varlistentry>
73
-
<term><parameter>errstr</parameter></term>
73
+
<term><parameter>error_message</parameter></term>
74
74
<listitem>
75
75
<para>
76
-
See <parameter>errno</parameter> description.
76
+
See <parameter>error_code</parameter> description.
77
77
</para>
78
78
</listitem>
79
79
</varlistentry>
...
...
@@ -110,6 +110,28 @@
110
110
</para>
111
111
</refsect1>
112
112

113
+
<refsect1 role="changelog">
114
+
&reftitle.changelog;
115
+
<informaltable>
116
+
<tgroup cols="2">
117
+
<thead>
118
+
<row>
119
+
<entry>&Version;</entry>
120
+
<entry>&Description;</entry>
121
+
</row>
122
+
</thead>
123
+
<tbody>
124
+
<row>
125
+
<entry>8.0.0</entry>
126
+
<entry>
127
+
<parameter>context</parameter> is nullable now.
128
+
</entry>
129
+
</row>
130
+
</tbody>
131
+
</tgroup>
132
+
</informaltable>
133
+
</refsect1>
134
+

113
135
<refsect1 role="examples">
114
136
&reftitle.examples;
115
137
<para>
...
...
@@ -186,7 +208,6 @@ do {
186
208
</simplelist>
187
209
</refsect1>
188
210
</refentry>
189
-

190
211
<!-- Keep this comment at the end of the file
191
212
Local variables:
192
213
mode: sgml
193
214