summaryrefslogtreecommitdiff
path: root/doc/zmq_setsockopt.txt
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-04-07 08:20:24 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-04-07 08:20:24 +0200
commit065e4d00ff628097ce693ac7d9056fbcaf23d0bc (patch)
tree6af84a116cfb555488487d9b179e70504159593b /doc/zmq_setsockopt.txt
parentedfd05df8ef58afc498795cb74906c07ee396f76 (diff)
parenta7973a2c4997e2ff79126eb073dc675c574de917 (diff)
Merge branch 'master' of git@github.com:sustrik/zeromq2
Diffstat (limited to 'doc/zmq_setsockopt.txt')
-rw-r--r--doc/zmq_setsockopt.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/zmq_setsockopt.txt b/doc/zmq_setsockopt.txt
index 6b31302..18c55bd 100644
--- a/doc/zmq_setsockopt.txt
+++ b/doc/zmq_setsockopt.txt
@@ -242,13 +242,16 @@ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS.CATS", 12);
.Setting I/O thread affinity
----
+int64_t affinity;
/* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */
-rc = zmq_setsockopt (socket, ZMQ_AFFINITY, 1, sizeof (int64_t));
+affinity = 1;
+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 */
-rc = zmq_setsockopt (socket, ZMQ_AFFINITY, 2, sizeof (int64_t));
+affinity = 2;
+rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof affinity);
assert (rc);
rc = zmq_bind (socket, "tcp://lo:5555");
assert (rc);