void myqttd_loop_watch_descriptor ( MyQttdLoop loop,
int  descriptor,
MyQttdLoopOnRead  on_read,
axlPointer  ptr,
axlPointer  ptr2 
)

Allows to configure a descriptor to be watched, providing optionally an on read handler (MyQttdLoopOnRead) to be used only to notify on read status on the provided descriptor.

In the case no on read handler is provided, the default handler configured at myqttd_loop_set_read_handler is used.

Parameters
loopThe loop to be configured with an on read handler.
descriptorThe file descriptor to be watched.
on_readThe on read handler to be executed.
ptrThe user defined pointer to be passed to the on read handler.
ptr2Second user defined pointer to be passed to the on read handler.

References myqtt_async_queue_push().

Referenced by myqttd_conn_mgr_setup_proxy_on_parent().