ZMQPoll handle

ZMQPoll: ZMQ Poll handle

class uzmq.poll.ZMQPoll(loop, socket)

Bases: object

Parameters:
  • loop – loop object where this handle runs (accessible through Poll.loop).
  • socket (int) – zmq socket to be monitored for readibility or writability.

ZMQPoll ZMQPoll handles can be used to monitor any ZMQ sockets for readability or writability.

loop

Read only

pyuv.Loop object where this handle runs.

active

Read only

Indicates if this handle is active.

close(callback=None)
Parameters:callback (callable) – Function that will be called after the ZMQPoll handle is closed.

Close the ZMQPoll handle. After a handle has been closed no other operations can be performed on it.

closed

Read only

Indicates if this handle is closing or already closed.

start(events, callback, timeout=-1)
Parameters:
  • events – int Mask of events that will be detected. The possible events are pyuv.UV_READABLE or pyuv.UV_WRITABLE.
  • callback – callable Function that will be called when the Poll handle receives events.
  • timeout – int Timeoout between each poll.

Callback signature: callback(poll_handle, events, errorno).

Start or update the event mask of the ZMQPoll handle.

stop()

Stop the Poll handle.