myopcualearning/myZeromqTemperatureSender.py

11 lines
181 B
Python

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)