mirror of
https://github.com/EDCD/EDDN.git
synced 2025-04-22 03:20:29 +03:00
Hacky test script that sends a message every second.
This commit is contained in:
parent
fc37bf4744
commit
15c2141493
15
src/sender.py
Normal file
15
src/sender.py
Normal 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()
|
Loading…
x
Reference in New Issue
Block a user