Created
March 22, 2013 06:43
-
-
Save ruedesign/5219435 to your computer and use it in GitHub Desktop.
ZeroMQ Reply sample (Request-Reply Model)
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 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