mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 19:10:22 +01:00
added newly added socket options to all language bindings, P2P model changed to PUB/SUB for throughput tests
This commit is contained in:
@@ -36,7 +36,13 @@ int main (int argc, char *argv [])
|
||||
|
||||
zmq::context_t ctx (1, 1);
|
||||
|
||||
zmq::socket_t s (ctx, ZMQ_P2P);
|
||||
zmq::socket_t s (ctx, ZMQ_SUB);
|
||||
|
||||
s.setsockopt (ZMQ_SUBSCRIBE , "*", 1);
|
||||
|
||||
// Add your socket options here.
|
||||
// For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.
|
||||
|
||||
s.bind (bind_to);
|
||||
|
||||
zmq::message_t msg;
|
||||
|
||||
@@ -36,7 +36,11 @@ int main (int argc, char *argv [])
|
||||
|
||||
zmq::context_t ctx (1, 1);
|
||||
|
||||
zmq::socket_t s (ctx, ZMQ_P2P);
|
||||
zmq::socket_t s (ctx, ZMQ_PUB);
|
||||
|
||||
// Add your socket options here.
|
||||
// For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.
|
||||
|
||||
s.connect (connect_to);
|
||||
|
||||
for (int i = 0; i != message_count; i++) {
|
||||
|
||||
Reference in New Issue
Block a user