summaryrefslogtreecommitdiff
path: root/doc/zmq_recv.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/zmq_recv.html')
-rw-r--r--doc/zmq_recv.html18
1 files changed, 15 insertions, 3 deletions
diff --git a/doc/zmq_recv.html b/doc/zmq_recv.html
index 218892d..50aaa56 100644
--- a/doc/zmq_recv.html
+++ b/doc/zmq_recv.html
@@ -660,6 +660,14 @@ socket types that switch between several states, such as ZMQ_REP. See the
The ØMQ <em>context</em> associated with the specified <em>socket</em> was terminated.
</p>
</dd>
+<dt class="hdlist1">
+<strong>EFAULT</strong>
+</dt>
+<dd>
+<p>
+The provided <em>socket</em> was not valid (NULL).
+</p>
+</dd>
</dl></div>
</div>
<h2 id="_example">EXAMPLE</h2>
@@ -673,13 +681,15 @@ int rc = zmq_msg_init (&amp;msg);
assert (rc == 0);
/* Block until a message is available to be received from socket */
rc = zmq_recv (socket, &amp;msg, 0);
-assert (rc == 0);</tt></pre>
+assert (rc == 0);
+/* Release message */
+zmq_msg_close (&amp;msg);</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Receiving a multi-part message</div>
<div class="content">
<pre><tt>int64_t more;
-int64_t more_size = sizeof more;
+size_t more_size = sizeof more;
do {
/* Create an empty 0MQ message to hold the message part */
zmq_msg_t part;
@@ -691,6 +701,7 @@ do {
/* Determine if more message parts are to follow */
rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &amp;more, &amp;more_size);
assert (rc == 0);
+ zmq_msg_close (&amp;part);
} while (more);</tt></pre>
</div></div>
</div>
@@ -710,7 +721,8 @@ Martin Lucina &lt;<a href="mailto:mato@kotelna.sk">mato@kotelna.sk</a>&gt;.</p><
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2010-06-02 18:24:18 CEST
+ØMQ 2.0.9<br />
+Last updated 2010-09-06 07:11:47 CEST
</div>
</div>
</body>