Created
August 5, 2019 09:22
-
-
Save pietern/ecddd844b4f762e3fbe188ee7bf46d01 to your computer and use it in GitHub Desktop.
Revisions
-
pietern created this gist
Aug 5, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/usr/bin/env python from nanomsg import Socket, PUB import time import sys pub = Socket(PUB) pub.bind('tcp://127.0.0.1:5000') # Publishes 1MB of data per second. # Adjust as needed. while True: buf = sys.stdin.read(1024 * 1024) pub.send(buf) time.sleep(1)