Function ucs_async_set_event_handler

Source
pub unsafe extern "C" fn ucs_async_set_event_handler(
    mode: ucs_async_mode_t,
    event_fd: c_int,
    events: ucs_event_set_types_t,
    cb: ucs_async_event_cb_t,
    arg: *mut c_void,
    async_: *mut ucs_async_context_t,
) -> ucs_status_t
Expand description

@ingroup UCS_RESOURCE

Register a file descriptor for monitoring (call handler upon events). Every fd can have only one handler.

@param mode Thread or signal. @param event_fd File descriptor to set handler for. @param events Events to wait on (UCS_EVENT_SET_EVxxx bits). @param cb Callback function to execute. @param arg Argument to callback. @param async Async context to which events are delivered. If NULL, safety is up to the user.

@return Error code as defined by @ref ucs_status_t.