mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-03 03:45:43 +08:00
Merge pull request #733 from mingulov/doc
Doc examples with zmq_msg_close usage - parameter is 'zmq_msg_t *'
This commit is contained in:
commit
75af9ddb78
@ -40,6 +40,7 @@ EXAMPLE
|
|||||||
-------
|
-------
|
||||||
.Receiving a multi-frame message
|
.Receiving a multi-frame message
|
||||||
----
|
----
|
||||||
|
zmq_msg_t frame;
|
||||||
while (true) {
|
while (true) {
|
||||||
// Create an empty 0MQ message to hold the message frame
|
// Create an empty 0MQ message to hold the message frame
|
||||||
int rc = zmq_msg_init (&frame);
|
int rc = zmq_msg_init (&frame);
|
||||||
@ -53,7 +54,7 @@ while (true) {
|
|||||||
fprintf (stderr, "end\n");
|
fprintf (stderr, "end\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
zmq_msg_close (frame);
|
zmq_msg_close (&frame);
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ while (true) {
|
|||||||
fprintf (stderr, "end\n");
|
fprintf (stderr, "end\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
zmq_msg_close (part);
|
zmq_msg_close (&part);
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user