From 5ba1cb20fe6f6699cef1cc726718e760cd4c9af1 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 23 Jan 2012 08:53:25 +0100 Subject: Imported Upstream version 2.0.9.dfsg --- doc/zmq_recv.3 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'doc/zmq_recv.3') 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 -.\" 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 \{\ -- cgit v1.2.3