How to use the txzmq.ZmqEndpointType.bind function in txZMQ

To help you get started, we’ve selected a few txZMQ examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brotchie / ib-zmq / ibzmq / proxy.py View on Github external
def main(config):
    zmq_requests_factory = ZmqFactory()
    zmq_requests_endpoint = ZmqEndpoint(ZmqEndpointType.bind, config['endpoint.command'])
    zmq_requests = ZmqRequests(zmq_requests_factory, zmq_requests_endpoint)

    zmq_broadcast_factory = ZmqFactory()
    zmq_broadcast_endpoint = ZmqEndpoint(ZmqEndpointType.bind, config['endpoint.broadcast'])
    zmq_broadcast = ZmqPubConnection(zmq_broadcast_factory, zmq_broadcast_endpoint)

    api_endpoint = TCP4ClientEndpoint(reactor, config['ibtws.host'], config['ibtws.port'])
    api_endpoint.connect(IBTWSProtocolFactory(zmq_requests, zmq_broadcast))
    reactor.run()
github MediaMath / qasino / lib / zmq_receiver.py View on Github external
def __init__(self, port, zmq_factory, data_manager):
        
        self.data_manager = data_manager

        endpoint = ZmqEndpoint(ZmqEndpointType.bind, "tcp://*:%d" % port)

        ZmqREPConnection.__init__(self, zmq_factory, endpoint)
github lightningd / plugins / zmq / cl-zmq.py View on Github external
def load_setup(self, setup):
        for e, s in setup.items():
            endpoint = ZmqEndpoint(ZmqEndpointType.bind, e)
            ZmqPubConnection.highWaterMark = s['high_water_mark']
            connection = ZmqPubConnection(self.factory, endpoint)
            for n in s['notification_type_names']:
                self.connection_map[n] = connection
github brotchie / ib-zmq / ibzmq / proxy.py View on Github external
def main(config):
    zmq_requests_factory = ZmqFactory()
    zmq_requests_endpoint = ZmqEndpoint(ZmqEndpointType.bind, config['endpoint.command'])
    zmq_requests = ZmqRequests(zmq_requests_factory, zmq_requests_endpoint)

    zmq_broadcast_factory = ZmqFactory()
    zmq_broadcast_endpoint = ZmqEndpoint(ZmqEndpointType.bind, config['endpoint.broadcast'])
    zmq_broadcast = ZmqPubConnection(zmq_broadcast_factory, zmq_broadcast_endpoint)

    api_endpoint = TCP4ClientEndpoint(reactor, config['ibtws.host'], config['ibtws.port'])
    api_endpoint.connect(IBTWSProtocolFactory(zmq_requests, zmq_broadcast))
    reactor.run()
github MediaMath / qasino / lib / zmq_publisher.py View on Github external
def __init__(self, zmq_factory, port, data_manager=None):

        self.data_manager = data_manager

        endpoint = ZmqEndpoint(ZmqEndpointType.bind, "tcp://*:%d" % port)

        ZmqPubConnection.__init__(self, zmq_factory, endpoint)
github leapcode / bitmask-dev / src / leap / bitmask / core / _zmq.py View on Github external
def startService(self):
        zf = ZmqFactory()
        e = ZmqEndpoint(ZmqEndpointType.bind, ENDPOINT)

        self._conn = _DispatcherREPConnection(zf, e, self._core)
        reactor.callWhenRunning(self._conn.do_greet)
        service.Service.startService(self)