diff options
author | Martin Lucina <mato@kotelna.sk> | 2010-09-08 15:25:45 +0200 |
---|---|---|
committer | Martin Lucina <martin@lucina.net> | 2012-01-23 08:53:27 +0100 |
commit | 90d73cba9cd1d1724f38ed82fc0eefb1781c9c20 (patch) | |
tree | 1760872164a93384d1adb90db9c8d41777dbb2a7 /doc/zmq_recv.txt | |
parent | cf026feae205bfeb7e007f6afd0e8d7b283865c8 (diff) | |
parent | 5ba1cb20fe6f6699cef1cc726718e760cd4c9af1 (diff) |
Imported Debian patch 2.0.9.dfsg-1debian/2.0.9.dfsg-1
Diffstat (limited to 'doc/zmq_recv.txt')
-rw-r--r-- | doc/zmq_recv.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/zmq_recv.txt b/doc/zmq_recv.txt index 79d3dc1..dc60af6 100644 --- a/doc/zmq_recv.txt +++ b/doc/zmq_recv.txt @@ -63,6 +63,8 @@ socket types that switch between several states, such as ZMQ_REP. See the _messaging patterns_ section of linkzmq:zmq_socket[3] for more information. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. +*EFAULT*:: +The provided 'socket' was not valid (NULL). EXAMPLE @@ -76,12 +78,14 @@ 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); ---- .Receiving a multi-part message ---- 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; @@ -93,6 +97,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); ---- |