Skip to content

Instantly share code, notes, and snippets.

@remyleone
Created July 25, 2017 17:14
Show Gist options
  • Select an option

  • Save remyleone/18eff524cfb55bfa4308629403c2479e to your computer and use it in GitHub Desktop.

Select an option

Save remyleone/18eff524cfb55bfa4308629403c2479e to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import zmq
context = zmq.Context()
subscriber = context.socket(zmq.SUB)
subscriber.connect("tcp://localhost:50002")
subscriber.setsockopt(zmq.SUBSCRIBE, "")
while True:
string = subscriber.recv_json()
print(string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment