myopcualearning/myZeromqTemperatureSender.py

11 lines
181 B
Python
Raw Normal View History

2016-06-20 14:35:43 +02:00
import zmq
import time
context = zmq.Context()
publisher = context.socket(zmq.PUB)
publisher.bind("tcp://127.0.0.1:12346")
while True:
publisher.send("abc")
time.sleep(5)