Hi,
I'm sending data in python between two connect machines within the same
network (successfully connected).
The publisher code is defined as:
def senderzmq(self, lat, lon):
sock = zmq.Context().socket(zmq.PUB)
sock.bind("tcp://*:10000")
running = True
while running:
sock.send_string(f"Lat {lat}, Lon={lon}")
The receiver has the following format:
import zmq
context=zmq.Context()
socket=context.socket(zmq.SUB)
socket.connect("tcp://192.168.1.35:10000")
while True:
message=socket.recv_string()
print(message)
The above development works, however, the sender always sends the same
data, it looks the sender remains within the while True state not listening
new data. If I remove the while True, the above doesn't work. Any idea how
to exit the while True but transmitting new data at each loop?
Thanks.
Raúl
_______________________________________________
zeromq-dev mailing list
[email protected]
https://lists.zeromq.org/mailman/listinfo/zeromq-dev