Created
May 9, 2016 10:40
-
-
Save Exchizz/90c7aae17f0209b63fec12ee91b1b84e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zmq | |
import time | |
port = "1337" | |
context = zmq.Context() | |
socket = context.socket(zmq.PUB) | |
socket.bind("tcp://*:%s" % port) | |
while True: | |
messagedata = "Test data" | |
print "sending" | |
socket.send("%s %s" % ("data_topic", messagedata)) | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment