Skip to content

Instantly share code, notes, and snippets.

@michelp
Created April 30, 2013 14:51
Show Gist options
  • Select an option

  • Save michelp/5489233 to your computer and use it in GitHub Desktop.

Select an option

Save michelp/5489233 to your computer and use it in GitHub Desktop.
>>> import zmq
>>> c = zmq.Context()
>>> d = c.socket(zmq.ROUTER)
>>> r = c.socket(zmq.ROUTER)
>>> d = c.socket(zmq.DEALER)
>>> r.bind('ipc://foo.sock')
>>> d.connect('ipc://foo.sock')
>>> d.send_multipart(["a", "b", "c"])
>>> r.recv()
'\x00\xe4<\x98i'
>>> r.recv()
'a'
>>> r.recv()
'b'
>>> r.recv()
'c'
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment