ipblc/tests/testzmq.py

13 lines
231 B
Python
Raw Normal View History

#!/usr/bin/python3
import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.connect("tcp://sys01:9999")
socket.setsockopt_string(zmq.SUBSCRIBE, "ipbl")
while True:
msg = socket.recv_string()
print(msg)