mirror of
https://github.com/titanscouting/tra-superscript.git
synced 2025-09-26 07:10:18 +00:00
14
test/client.py
Normal file
14
test/client.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import signal
|
||||
import zmq
|
||||
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
|
||||
context = zmq.Context()
|
||||
|
||||
socket = context.socket(zmq.SUB)
|
||||
socket.connect('tcp://localhost:5678')
|
||||
socket.setsockopt(zmq.SUBSCRIBE, b'status')
|
||||
|
||||
while True:
|
||||
message = socket.recv_multipart()
|
||||
print(f'Received: {message}')
|
Reference in New Issue
Block a user