mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 07:31:03 +08:00
Fixed sizeof usage in man pages
This commit is contained in:
parent
593010fbeb
commit
8ea779c8f7
@ -91,7 +91,7 @@ zmq_msg_close (&msg);
|
||||
.Receiving a multi-part message
|
||||
----
|
||||
int64_t more;
|
||||
size_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;
|
||||
|
@ -89,7 +89,7 @@ zmq_msg_close (&msg);
|
||||
.Receiving a multi-part message
|
||||
----
|
||||
int64_t more;
|
||||
size_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;
|
||||
|
@ -533,13 +533,13 @@ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS.CATS", 12);
|
||||
int64_t affinity;
|
||||
/* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */
|
||||
affinity = 1;
|
||||
rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof affinity);
|
||||
rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof (affinity));
|
||||
assert (rc);
|
||||
rc = zmq_bind (socket, "tcp://lo:5555");
|
||||
assert (rc);
|
||||
/* Incoming connections on TCP port 5556 shall be handled by I/O thread 2 */
|
||||
affinity = 2;
|
||||
rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof affinity);
|
||||
rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof (affinity));
|
||||
assert (rc);
|
||||
rc = zmq_bind (socket, "tcp://lo:5556");
|
||||
assert (rc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user