one-file-projects/0mq_server.py

13 lines
198 B
Python
Raw Permalink Normal View History

2016-06-23 15:17:59 +02:00
#!/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)