Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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()
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)
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
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()
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)
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)