flandre/test/testcppzmq.py
2025-01-17 20:45:22 +08:00

8 lines
186 B
Python

import zmq
if __name__ == '__main__':
ctx = zmq.Context()
sock = ctx.socket(zmq.PULL)
sock.bind('tcp://0.0.0.0:5558')
while True:
s = sock.recv()
print(s)