void vortex_io_waiting_set_wait_on_fd_group VortexIoWaitOnFdGroup  wait_on  ) 
 

Allows to configure the wait on fd group handler.

This handler allows to configure how is implemented a non-consuming resource on a given fd group.

The invoked function should return a selected error code according to the following values:

  • A timeout operation was being received, then -1 should be returned.

  • A error has being received but the call loop should continue without paying attention to it, without checking for the sockets for its status, and to perform as soon as possible the same wait. This is used because current current default implementation, which used the IO "select" call could return because a signal was received. If the IO implemented doesn't require to implement this concept, just ignore it. Returned value should be -2.

  • A non recoverable error has happened, and vortex reader should exist. In this case -3 should be returned. This error code is also used by the internal vortex IO handler invocation to report that a wait handler haven't been defined.

  • No socket descriptor have change but it is required to perform again the blocking IO wait. Then 0 should be returned.

  • For the rest of the cases, the number of sockets could be returned by this function, however, this is not used by the Vortex Library. To report that a socket have changed (or a group of then inside the fd set), and you don't want to return how many sockets have changed, just return a positive value (1).

Parameters:
wait_on The handler to be used. The function will fail on setting the handler if it is provided a NULL reference.