Created
July 21, 2013 07:31
-
-
Save arbinish/6047828 to your computer and use it in GitHub Desktop.
zmq echo client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zmq | |
import sys | |
ctx = zmq.Context() | |
sock = ctx.socket(zmq.REQ) | |
sock.connect('tcp://localhost:3610') | |
for i in range(10): | |
print '%s -> ' % randMsg, | |
sys.stdout.flush() | |
sock.send(randMsg) | |
msg = sock.recv() | |
print msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment