axl_bool myqtt_io_waiting_use ( MyQttCtx ctx,
MyQttIoWaitingType  type 

poll(2) system call implementation.

linux epoll(2) system call implementation. Allows to configure the default io waiting mechanism to be used by the library.

To get current mechanism selected you must use myqtt_io_waiting_get_current. During the compilation process, myqtt selects the default mechanism, choosing the best available.

This function is designed to support changing the I/O API at runtime so, you can call to this function during normal myqtt operations.

Here is an example of code on how to change the default mechanism to use system call poll(2):

1 // check the mechanism is available
2 if (myqtt_io_waiting_is_available (MYQTT_IO_WAIT_POLL)) {
3  // configure the mechanism
4  myqtt_io_waiting_use (ctx, MYQTT_IO_WAIT_POLL);
5 }
ctxThe context where the operation will be performed.
typeThe I/O waiting mechanism to be used by the library (especially at the myqtt reader module).
axl_true if the mechanism was activated, otherwise axl_false is returned.

References MYQTT_IO_WAIT_EPOLL, MYQTT_IO_WAIT_POLL, MYQTT_IO_WAIT_SELECT, and myqtt_io_waiting_is_available().