2021-04-25 12:16:11 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import itertools
|
|
|
|
import sys
|
|
|
|
|
|
|
|
import zmq
|
|
|
|
|
|
|
|
|
|
|
|
context = zmq.Context()
|
|
|
|
socket = context.socket(zmq.PUB)
|
|
|
|
socket.bind("tcp://127.0.0.1:5559")
|
|
|
|
|
2021-04-25 12:23:17 +02:00
|
|
|
n = 10
|
|
|
|
msg_body = "a" * n
|
2021-04-25 12:16:11 +02:00
|
|
|
try:
|
|
|
|
while True:
|
|
|
|
socket.send_string(f"test {msg_body}")
|
2021-04-25 12:24:41 +02:00
|
|
|
except KeyboardInterrupt:
|
2021-04-25 12:16:11 +02:00
|
|
|
socket.close()
|