Created
July 15, 2011 09:19
-
-
Save pmarques/1084375 to your computer and use it in GitHub Desktop.
resolve asyncsrv.pl issue, the original example doesn't work!
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
60c59,69 | |
< zmq.device(zmq.QUEUE, frontend, backend) | |
--- | |
> while True: | |
> sockets = dict(poll.poll()) | |
> if frontend in sockets: | |
> if sockets[frontend] == zmq.POLLIN: | |
> msg = frontend.recv() | |
> print 'Server received %s' % (msg) | |
> backend.send(msg) | |
> if backend in sockets: | |
> if sockets[backend] == zmq.POLLIN: | |
> msg = backend.recv() | |
> frontend.send(msg) | |
77d85 | |
< src = worker.recv() | |
83d90 | |
< worker.send(src, zmq.SNDMORE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment