's.monitor(addr, flags)
Start publishing socket events on inproc.
See libzmq docs for zmq_monitor for details.
Note: requires libzmq >= 3.2
Parameters
addr : str
The inproc url used for monitoring. Passing None as
the addr will cause an existing socket monitor to be
deregistered.
events : int [default: zmq.EVENT_ALL]
The zmq event bitmask for which events will be sent to the monitor.'

def monitor(self, addr, events=(-1)):

    _check_version((3, 2), 'monitor')
    if (events < 0):
        events = zmq.EVENT_ALL
    if (addr is None):
        addr = ffi.NULL
    if isinstance(addr, unicode):
        addr = addr.encode('utf8')
    rc = C.zmq_socket_monitor(self._zmq_socket, addr, events)
