Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def startService(self):
factory = ZmqFactory()
log.msg("Delegator connecting to repeater: %s" % ZMQ_REPEATER)
endpoint = ZmqEndpoint('connect', ZMQ_REPEATER)
self.conn = ZmqPushConnection(factory, endpoint)
def startService(self):
factory = ZmqFactory()
bind_point = 'tcp://0.0.0.0:8050'
log.msg("Broadcaster binding on: %s" % bind_point)
endpoint = ZmqEndpoint('bind', bind_point)
self.conn = ZmqPushConnection(factory, endpoint)
def __init__(self, emit_addr=EMIT_ADDR, reg_addr=REG_ADDR,
path_prefix=None):
"""
Initialize the events server.
"""
TxZmqClientComponent.__init__(self, path_prefix=path_prefix)
EventsClient.__init__(self, emit_addr, reg_addr)
# connect SUB first, otherwise we might miss some event sent from this
# same client
self._sub = self._zmq_connect(txzmq.ZmqSubConnection, reg_addr)
self._sub.gotMessage = self._gotMessage
self._push = self._zmq_connect(txzmq.ZmqPushConnection, emit_addr)