Inheritance diagram for zmq.devices.basedevice:
Classes for running 0MQ Devices in the background.
Bases: zmq.devices.basedevice.Device
Base class for launching Devices in background processes and threads.
Enqueue ZMQ address for binding on in_socket.
See zmq.Socket.bind for details.
Enqueue ZMQ address for binding on out_socket.
See zmq.Socket.bind for details.
Enqueue ZMQ address for connecting on in_socket.
See zmq.Socket.connect for details.
Enqueue ZMQ address for connecting on out_socket.
See zmq.Socket.connect for details.
The runner method.
Do not call me directly, instead call self.start(), just like a Thread.
Enqueue setsockopt(opt, value) for in_socket
See zmq.Socket.setsockopt for details.
Enqueue setsockopt(opt, value) for out_socket
See zmq.Socket.setsockopt for details.
A Threadsafe 0MQ Device.
Warning as with most ‘threadsafe’ Python objects, this is only threadsafe as long as you do not use private methods or attributes. Private names are prefixed with ‘_’, such as self._setup_socket().
For thread safety, you do not pass Sockets to this, but rather Socket types:
Device(device_type, in_socket_type, out_socket_type)
For instance:
dev = Device(zmq.QUEUE, zmq.XREQ, zmq.XREP)
Similar to zmq.device, but socket types instead of sockets themselves are passed, and the sockets are created in the work thread, to avoid issues with thread safety. As a result, additional bind_{in|out} and connect_{in|out} methods and setsockopt_{in|out} allow users to specify connections for the sockets.
Parameters : | device_type : int
{in|out}_type : int
|
---|---|
Attributes : | daemon : int
|
Methods : | bind_{in_out}(iface) :
connect_{in_out}(iface) :
setsockopt_{in_out}(opt,value) :
|
Enqueue ZMQ address for binding on in_socket.
See zmq.Socket.bind for details.
Enqueue ZMQ address for binding on out_socket.
See zmq.Socket.bind for details.
Enqueue ZMQ address for connecting on in_socket.
See zmq.Socket.connect for details.
Enqueue ZMQ address for connecting on out_socket.
See zmq.Socket.connect for details.
wait for me to finish, like Thread.join.
Reimplemented appropriately by sublcasses.
The runner method.
Do not call me directly, instead call self.start(), just like a Thread.
Enqueue setsockopt(opt, value) for in_socket
See zmq.Socket.setsockopt for details.
Enqueue setsockopt(opt, value) for out_socket
See zmq.Socket.setsockopt for details.
Start the device. Override me in subclass for other launchers.
Bases: zmq.devices.basedevice.BackgroundDevice
A Device that will be run in a background Process.
See Device for details.
Enqueue ZMQ address for binding on in_socket.
See zmq.Socket.bind for details.
Enqueue ZMQ address for binding on out_socket.
See zmq.Socket.bind for details.
Enqueue ZMQ address for connecting on in_socket.
See zmq.Socket.connect for details.
Enqueue ZMQ address for connecting on out_socket.
See zmq.Socket.connect for details.
The runner method.
Do not call me directly, instead call self.start(), just like a Thread.
Enqueue setsockopt(opt, value) for in_socket
See zmq.Socket.setsockopt for details.
Enqueue setsockopt(opt, value) for out_socket
See zmq.Socket.setsockopt for details.
Bases: zmq.devices.basedevice.BackgroundDevice
A Device that will be run in a background Thread.
See Device for details.
Enqueue ZMQ address for binding on in_socket.
See zmq.Socket.bind for details.
Enqueue ZMQ address for binding on out_socket.
See zmq.Socket.bind for details.
Enqueue ZMQ address for connecting on in_socket.
See zmq.Socket.connect for details.
Enqueue ZMQ address for connecting on out_socket.
See zmq.Socket.connect for details.
The runner method.
Do not call me directly, instead call self.start(), just like a Thread.
Enqueue setsockopt(opt, value) for in_socket
See zmq.Socket.setsockopt for details.
Enqueue setsockopt(opt, value) for out_socket
See zmq.Socket.setsockopt for details.