Guest User

Untitled

a guest
Jul 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. import zmq
  2. context = zmq.Context()
  3. socket = context.socket(zmq.SUB)
  4. print("Recibo mensajes del servidor...")
  5. socket.connect("tcp://206.189.210.196:8001")
  6. socket.setsockopt_string(zmq.SUBSCRIBE, u'')
  7.  
  8. while True:
  9. JSON = socket.recv_json()
  10. print(JSON)
Add Comment
Please, Sign In to add comment