Skip to content

Instantly share code, notes, and snippets.

@ruedesign
Created March 22, 2013 06:43
Show Gist options
  • Save ruedesign/5219435 to your computer and use it in GitHub Desktop.
Save ruedesign/5219435 to your computer and use it in GitHub Desktop.
ZeroMQ Reply sample (Request-Reply Model)
import zmq
import time
context = zmq.Context()
rep = context.socket(zmq.REP)
rep.bind("tcp://127.0.0.1:5555")
while True:
request = rep.recv()
print "recieved request: [%s]" % request
time.sleep(1.0)
rep.send("%s-response" % request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment