Show More
@@ -40,6 +40,10 class Heart(object): | |||||
40 | id=None |
|
40 | id=None | |
41 | def __init__(self, in_addr, out_addr, in_type=zmq.SUB, out_type=zmq.DEALER, heart_id=None): |
|
41 | def __init__(self, in_addr, out_addr, in_type=zmq.SUB, out_type=zmq.DEALER, heart_id=None): | |
42 | self.device = ThreadDevice(zmq.FORWARDER, in_type, out_type) |
|
42 | self.device = ThreadDevice(zmq.FORWARDER, in_type, out_type) | |
|
43 | # do not allow the device to share global Context.instance, | |||
|
44 | # which is the default behavior in pyzmq > 2.1.10 | |||
|
45 | self.device.context_factory = zmq.Context | |||
|
46 | ||||
43 | self.device.daemon=True |
|
47 | self.device.daemon=True | |
44 | self.device.connect_in(in_addr) |
|
48 | self.device.connect_in(in_addr) | |
45 | self.device.connect_out(out_addr) |
|
49 | self.device.connect_out(out_addr) |
General Comments 0
You need to be logged in to leave comments.
Login now