Hacky test script that sends a message every second.

This commit is contained in:
James Muscat 2014-11-16 00:07:30 +00:00
parent fc37bf4744
commit 15c2141493

15
src/sender.py Normal file
View File

@ -0,0 +1,15 @@
import zmq.green as zmq
import time
def main():
context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.bind("tcp://*:9500")
while True:
socket.send('{"PING" : ' + str(time.time()) + '}')
time.sleep(1)
if __name__ == '__main__':
main()