Created
July 10, 2010 16:45
-
-
Save berry/470849 to your computer and use it in GitHub Desktop.
0MQ request response test against a Redis server
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
# Code below doesn't work. It keeps waiting for a response. | |
import zmq | |
ctx = zmq.Context() | |
s = ctx.socket(zmq.REQ) | |
# On port 6379 there is a basic REDIS server | |
s.connect("tcp://127.0.0.1:6379") | |
s.send('*1\r\n$4\r\nPING\r\n') | |
print s.recv() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment