def main():
    auth = ThreadAuthenticator(zmq.Context.instance())
    auth.start()
    auth.allow('127.0.0.1')
    # Tell the authenticator how to handle CURVE requests
    auth.configure_curve(domain='*', location=zmq.auth.CURVE_ALLOW_ANY)

    key = Key.load('example/broker.key_secret')
    broker = SecureMajorDomoBroker(key, sys.argv[1])
    try:
        broker.serve_forever()
    except KeyboardInterrupt:
        auth.stop()
        raise
def main():
    auth = ThreadAuthenticator(zmq.Context.instance())
    auth.start()
    auth.allow('127.0.0.1')
    # Tell the authenticator how to handle CURVE requests
    auth.configure_curve(domain='*', location=zmq.auth.CURVE_ALLOW_ANY)

    key = Key.load('example/broker.key_secret')
    broker = SecureMajorDomoBroker(key, sys.argv[1])
    try:
        broker.serve_forever()
    except KeyboardInterrupt:
        auth.stop()
        raise
def main():
    client_key = Key.load("example/worker.key_secret")
    server_key = Key.load("example/broker.key")
    broker = SecureMajorDomoWorker(server_key, client_key, sys.argv[1], "echo", echo)
    broker.serve_forever()
Exemplo n.º 4
0
def main():
    client_key = Key.load('example/worker.key_secret')
    server_key = Key.load('example/broker.key')
    broker = SecureMajorDomoWorker(server_key, client_key, sys.argv[1], 'echo',
                                   echo)
    broker.serve_forever()