summaryrefslogtreecommitdiff
path: root/doc/zmq_recv.3
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2010-09-08 15:25:45 +0200
committerMartin Lucina <martin@lucina.net>2012-01-23 08:53:27 +0100
commit90d73cba9cd1d1724f38ed82fc0eefb1781c9c20 (patch)
tree1760872164a93384d1adb90db9c8d41777dbb2a7 /doc/zmq_recv.3
parentcf026feae205bfeb7e007f6afd0e8d7b283865c8 (diff)
parent5ba1cb20fe6f6699cef1cc726718e760cd4c9af1 (diff)
Imported Debian patch 2.0.9.dfsg-1debian/2.0.9.dfsg-1
Diffstat (limited to 'doc/zmq_recv.3')
-rw-r--r--doc/zmq_recv.318
1 files changed, 14 insertions, 4 deletions
diff --git a/doc/zmq_recv.3 b/doc/zmq_recv.3
index 8e9720e..1c65e4d 100644
--- a/doc/zmq_recv.3
+++ b/doc/zmq_recv.3
@@ -2,12 +2,12 @@
.\" Title: zmq_recv
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
-.\" Date: 06/04/2010
+.\" Date: 09/06/2010
.\" Manual: 0MQ Manual
-.\" Source: 0MQ 2.0.7
+.\" Source: 0MQ 2.0.9
.\" Language: English
.\"
-.TH "ZMQ_RECV" "3" "06/04/2010" "0MQ 2\&.0\&.7" "0MQ Manual"
+.TH "ZMQ_RECV" "3" "09/06/2010" "0MQ 2\&.0\&.9" "0MQ Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -88,6 +88,13 @@ associated with the specified
\fIsocket\fR
was terminated\&.
.RE
+.PP
+\fBEFAULT\fR
+.RS 4
+The provided
+\fIsocket\fR
+was not valid (NULL)\&.
+.RE
.SH "EXAMPLE"
.PP
\fBReceiving a message from a socket\fR.
@@ -103,6 +110,8 @@ assert (rc == 0);
/* Block until a message is available to be received from socket */
rc = zmq_recv (socket, &msg, 0);
assert (rc == 0);
+/* Release message */
+zmq_msg_close (&msg);
.fi
.if n \{\
.RE
@@ -115,7 +124,7 @@ assert (rc == 0);
.\}
.nf
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;
@@ -127,6 +136,7 @@ do {
/* Determine if more message parts are to follow */
rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size);
assert (rc == 0);
+ zmq_msg_close (&part);
} while (more);
.fi
.if n \{\