Created
March 22, 2013 06:44
-
-
Save ruedesign/5219438 to your computer and use it in GitHub Desktop.
ZeroMQ Request 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 | |
context = zmq.Context() | |
req = context.socket(zmq.REQ) | |
req.connect("tcp://127.0.0.1:5555") | |
while True: | |
c += 1 | |
msg = "%s" % c | |
req.send(msg) | |
print "sended request: [%s]" % msg | |
response = req.recv() | |
print "recieved response: [%s]" % response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment