def __init__(self, zmq_address, poll_timeout=<NUM_LIT>, zmq_flags=<NUM_LIT:0>):
<EOL>context = zmq.Context()<EOL>self.sockets = {}<EOL>host, port = urllib.parse.splitport(zmq_address)<EOL>ports = {<EOL>zmq.REQ: int(port),<EOL>zmq.PUSH: int(port) + <NUM_LIT:1>,<EOL>zmq.SUB: int(port) + <NUM_LIT:2><EOL>}<EOL>for socket, port in ports.items():<EOL><INDENT>self.sockets[socket] = context.socket(socket)<EOL>self.sockets[socket].connect(<EOL>"<STR_LIT::>".join([<EOL>host,<EOL>str(port)<EOL>])<EOL>)<EOL><DEDENT>self.pollers = {}<EOL>for socket in [zmq.REQ, zmq.PUSH, zmq.SUB]:<EOL><INDENT>poller = zmq.Poller()<EOL>self.pollers[socket] = poller<EOL>self.pollers[socket].register(self.sockets[socket], zmq.POLLIN)<EOL><DEDENT>self.poll_timeout = poll_timeout<EOL>self.zmq_flags = zmq_flags<EOL>self.socket = self.sockets[zmq.REQ]<EOL>self.poll = self.pollers[zmq.REQ]<EOL>
Constructor