Skip to content

Instantly share code, notes, and snippets.

@arbinish
Created July 21, 2013 07:31
Show Gist options
  • Save arbinish/6047828 to your computer and use it in GitHub Desktop.
Save arbinish/6047828 to your computer and use it in GitHub Desktop.
zmq echo client
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