Unverified Commit 51347acf authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Make zmqsend port optional

parent 3a8c5691
#!/usr/bin/env python
#!/usr/bin/env python3
import zmq
import sys
......@@ -6,12 +6,14 @@ import time
import numpy as np
from numpy.random import random
port = sys.argv[1]
if len(sys.argv) > 0:
port = sys.argv[1]
port = "5557"
ctx = zmq.Context()
sender = ctx.socket(zmq.PUSH)
sender.bind("tcp://" + port)
while True:
sender.send(np.array(3000 + random() * 500, dtype="float32"))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment