reference/sem/functions/msg-receive.xml
f7e33278a909d7f7bf491f77cb10c93581091736
...
...
@@ -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.msg-receive">
3
+
<refentry xml:id="function.msg-receive" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>msg_receive</refname>
6
6
<refpurpose>Receive a message from a message queue</refpurpose>
...
...
@@ -10,19 +10,19 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>msg_receive</methodname>
13
-
<methodparam><type>resource</type><parameter>queue</parameter></methodparam>
14
-
<methodparam><type>int</type><parameter>desiredmsgtype</parameter></methodparam>
15
-
<methodparam><type>int</type><parameter role="reference">msgtype</parameter></methodparam>
16
-
<methodparam><type>int</type><parameter>maxsize</parameter></methodparam>
13
+
<methodparam><type>SysvMessageQueue</type><parameter>queue</parameter></methodparam>
14
+
<methodparam><type>int</type><parameter>desired_message_type</parameter></methodparam>
15
+
<methodparam><type>int</type><parameter role="reference">received_message_type</parameter></methodparam>
16
+
<methodparam><type>int</type><parameter>max_message_size</parameter></methodparam>
17
17
<methodparam><type>mixed</type><parameter role="reference">message</parameter></methodparam>
18
-
<methodparam choice="opt"><type>bool</type><parameter>unserialize</parameter><initializer>true</initializer></methodparam>
18
+
<methodparam choice="opt"><type>bool</type><parameter>unserialize</parameter><initializer>&true;</initializer></methodparam>
19
19
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
20
-
<methodparam choice="opt"><type>int</type><parameter role="reference">errorcode</parameter></methodparam>
20
+
<methodparam choice="opt"><type>int</type><parameter role="reference">error_code</parameter><initializer>&null;</initializer></methodparam>
21
21
</methodsynopsis>
22
22
<para>
23
23
<function>msg_receive</function> will receive the first message from the
24
24
specified <parameter>queue</parameter> of the type specified by
25
-
<parameter>desiredmsgtype</parameter>.
25
+
<parameter>desired_message_type</parameter>.
26
26
</para>
27
27
</refsect1>
28
28

...
...
@@ -34,19 +34,20 @@
34
34
<term><parameter>queue</parameter></term>
35
35
<listitem>
36
36
<para>
37
+
The message queue.
37
38
</para>
38
39
</listitem>
39
40
</varlistentry>
40
41
<varlistentry>
41
-
<term><parameter>desiredmsgtype</parameter></term>
42
+
<term><parameter>desired_message_type</parameter></term>
42
43
<listitem>
43
44
<para>
44
-
If <parameter>desiredmsgtype</parameter> is 0, the message from the front
45
-
of the queue is returned. If <parameter>desiredmsgtype</parameter> is
45
+
If <parameter>desired_message_type</parameter> is 0, the message from the front
46
+
of the queue is returned. If <parameter>desired_message_type</parameter> is
46
47
greater than 0, then the first message of that type is returned.
47
-
If <parameter>desiredmsgtype</parameter> is less than 0, the first
48
-
message on the queue with the lowest type less than or equal to the
49
-
absolute value of <parameter>desiredmsgtype</parameter> will be read.
48
+
If <parameter>desired_message_type</parameter> is less than 0, the first
49
+
message on the queue with a type less than or equal to the
50
+
absolute value of <parameter>desired_message_type</parameter> will be read.
50
51
If no messages match the criteria, your script will wait until a suitable
51
52
message arrives on the queue. You can prevent the script from blocking
52
53
by specifying <constant>MSG_IPC_NOWAIT</constant> in the
...
...
@@ -55,7 +56,7 @@
55
56
</listitem>
56
57
</varlistentry>
57
58
<varlistentry>
58
-
<term><parameter>msgtype</parameter></term>
59
+
<term><parameter>received_message_type</parameter></term>
59
60
<listitem>
60
61
<para>
61
62
The type of the message that was received will be stored in this
...
...
@@ -64,11 +65,11 @@
64
65
</listitem>
65
66
</varlistentry>
66
67
<varlistentry>
67
-
<term><parameter>maxsize</parameter></term>
68
+
<term><parameter>max_message_size</parameter></term>
68
69
<listitem>
69
70
<para>
70
71
The maximum size of message to be accepted is specified by the
71
-
<parameter>maxsize</parameter>; if the message in the queue is larger
72
+
<parameter>max_message_size</parameter>; if the message in the queue is larger
72
73
than this size the function will fail (unless you set
73
74
<parameter>flags</parameter> as described below).
74
75
</para>
...
...
@@ -114,7 +115,7 @@
114
115
<row>
115
116
<entry><constant>MSG_IPC_NOWAIT</constant></entry>
116
117
<entry>If there are no messages of the
117
-
<parameter>desiredmsgtype</parameter>, return immediately and do not
118
+
<parameter>desired_message_type</parameter>, return immediately and do not
118
119
wait. The function will fail and return an integer value
119
120
corresponding to <constant>MSG_ENOMSG</constant>.
120
121
</entry>
...
...
@@ -122,16 +123,16 @@
122
123
<row>
123
124
<entry><constant>MSG_EXCEPT</constant></entry>
124
125
<entry>Using this flag in combination with a
125
-
<parameter>desiredmsgtype</parameter> greater than 0 will cause the
126
+
<parameter>desired_message_type</parameter> greater than 0 will cause the
126
127
function to receive the first message that is not equal to
127
-
<parameter>desiredmsgtype</parameter>.</entry>
128
+
<parameter>desired_message_type</parameter>.</entry>
128
129
</row>
129
130
<row>
130
131
<entry><constant>MSG_NOERROR</constant></entry>
131
132
<entry>
132
-
If the message is longer than <parameter>maxsize</parameter>,
133
+
If the message is longer than <parameter>max_message_size</parameter>,
133
134
setting this flag will truncate the message to
134
-
<parameter>maxsize</parameter> and will not signal an error.
135
+
<parameter>max_message_size</parameter> and will not signal an error.
135
136
</entry>
136
137
</row>
137
138
</tbody>
...
...
@@ -141,10 +142,10 @@
141
142
</listitem>
142
143
</varlistentry>
143
144
<varlistentry>
144
-
<term><parameter>errorcode</parameter></term>
145
+
<term><parameter>error_code</parameter></term>
145
146
<listitem>
146
147
<para>
147
-
If the function fails, the optional <parameter>errorcode</parameter>
148
+
If the function fails, the optional <parameter>error_code</parameter>
148
149
will be set to the value of the system errno variable.
149
150
</para>
150
151
</listitem>
...
...
@@ -166,6 +167,31 @@
166
167
</para>
167
168
</refsect1>
168
169

170
+
<refsect1 role="changelog">
171
+
&reftitle.changelog;
172
+
<para>
173
+
<informaltable>
174
+
<tgroup cols="2">
175
+
<thead>
176
+
<row>
177
+
<entry>&Version;</entry>
178
+
<entry>&Description;</entry>
179
+
</row>
180
+
</thead>
181
+
<tbody>
182
+
<row>
183
+
<entry>8.0.0</entry>
184
+
<entry>
185
+
<parameter>queue</parameter> expects a <classname>SysvMessageQueue</classname>
186
+
instance now; previously, a <type>resource</type> was expected.
187
+
</entry>
188
+
</row>
189
+
</tbody>
190
+
</tgroup>
191
+
</informaltable>
192
+
</para>
193
+
</refsect1>
194
+
169
195
<refsect1 role="seealso">
170
196
&reftitle.seealso;
171
197
<para>
...
...
@@ -179,7 +205,6 @@
179
205
</refsect1>
180
206

181
207
</refentry>
182
-

183
208
<!-- Keep this comment at the end of the file
184
209
Local variables:
185
210
mode: sgml
186
211