12 lines
198 B
Python
12 lines
198 B
Python
#!/usr/bin/env python
|
|
|
|
import zmq
|
|
|
|
context = zmq.Context()
|
|
|
|
server = context.socket(zmq.PUB)
|
|
server.bind("tcp://*:5555")
|
|
|
|
while True:
|
|
line = input("> ")
|
|
server.send_string("MSG %s" % line)
|