client.connect('tcp://127.0.0.1:9999')
client.send(msg)

def server():
    context = zmq.Context()
server = context.socket(zmq.PULL)
server.bind('tcp://127.0.0.1:9999')
while True:
    msg = server.recv()
Фоновый процесс в Python