mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 18:40:27 +01:00
Merge branch 'master' of git@github.com:sustrik/zeromq2
This commit is contained in:
commit
065e4d00ff
@ -47,11 +47,11 @@ The requested 'transport' protocol is not supported.
|
|||||||
*ENOCOMPATPROTO*::
|
*ENOCOMPATPROTO*::
|
||||||
The requested 'transport' protocol is not compatible with the socket type.
|
The requested 'transport' protocol is not compatible with the socket type.
|
||||||
*EADDRINUSE*::
|
*EADDRINUSE*::
|
||||||
The given 'address' is already in use.
|
The requested 'address' is already in use.
|
||||||
*EADDRNOTAVAIL*::
|
*EADDRNOTAVAIL*::
|
||||||
Requested 'address' was not local.
|
The requested 'address' was not local.
|
||||||
*ENODEV*::
|
*ENODEV*::
|
||||||
A nonexistent interface was requested.
|
The requested 'address' specifies a nonexistent interface.
|
||||||
|
|
||||||
|
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
|
@ -242,13 +242,16 @@ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS.CATS", 12);
|
|||||||
|
|
||||||
.Setting I/O thread affinity
|
.Setting I/O thread affinity
|
||||||
----
|
----
|
||||||
|
int64_t affinity;
|
||||||
/* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */
|
/* 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);
|
assert (rc);
|
||||||
rc = zmq_bind (socket, "tcp://lo:5555");
|
rc = zmq_bind (socket, "tcp://lo:5555");
|
||||||
assert (rc);
|
assert (rc);
|
||||||
/* Incoming connections on TCP port 5556 shall be handled by I/O thread 2 */
|
/* 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);
|
assert (rc);
|
||||||
rc = zmq_bind (socket, "tcp://lo:5555");
|
rc = zmq_bind (socket, "tcp://lo:5555");
|
||||||
assert (rc);
|
assert (rc);
|
||||||
|
Loading…
Reference in New Issue
Block a user