silc_schedule_set_listen_fd

SYNOPSIS

    SilcBool silc_schedule_set_listen_fd(SilcSchedule schedule,
                                         SilcUInt32 fd,
                                         SilcTaskEvent mask,
                                         SilcBool send_events);

DESCRIPTION

Sets a file descriptor `fd' to be listened by the scheduler for `mask' events. To tell scheduler not to listen anymore for this file descriptor call the silc_schedule_unset_listen_fd function. When new task is created with silc_schedule_task_add the event for the task's fd is initially set to SILC_TASK_READ. If you need to control the task's fd's events you must call this function whenever you need to change the events. This can be called multiple times to change the events.

If the `send_events' is TRUE then this function sends the events in `mask' to the application. If FALSE then they are sent only after the event occurs in reality. In normal cases the `send_events' is set to FALSE.

If `schedule' is NULL this will call silc_schedule_get_global to try to get global scheduler.

Returns FALSE if the operation could not performed and TRUE if it was a success.