mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-18 19:48:47 +02:00
added newly added socket options to all language bindings, P2P model changed to PUB/SUB for throughput tests
This commit is contained in:
@@ -35,7 +35,13 @@ def main ():
|
||||
sys.exit (1)
|
||||
|
||||
ctx = libpyzmq.Context (1, 1);
|
||||
s = libpyzmq.Socket (ctx, libpyzmq.P2P)
|
||||
s = libpyzmq.Socket (ctx, libpyzmq.SUB)
|
||||
|
||||
s.setsockopt (libpyzmq.SUBSCRIBE , "*");
|
||||
|
||||
# Add your socket options here.
|
||||
# For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.
|
||||
|
||||
s.bind (bind_to)
|
||||
|
||||
msg = s.recv ()
|
||||
|
@@ -35,7 +35,11 @@ def main ():
|
||||
sys.exit (1)
|
||||
|
||||
ctx = libpyzmq.Context (1, 1);
|
||||
s = libpyzmq.Socket (ctx, libpyzmq.P2P)
|
||||
s = libpyzmq.Socket (ctx, libpyzmq.PUB)
|
||||
|
||||
# Add your socket options here.
|
||||
# For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM.
|
||||
|
||||
s.connect (connect_to)
|
||||
|
||||
msg = ''.join ([' ' for n in range (0, message_size)])
|
||||
|
Reference in New Issue
Block a user