Function ucp_worker_set_am_handler

Source
pub unsafe extern "C" fn ucp_worker_set_am_handler(
    worker: ucp_worker_h,
    id: u16,
    cb: ucp_am_callback_t,
    arg: *mut c_void,
    flags: u32,
) -> ucs_status_t
Expand description

@ingroup UCP_WORKER @brief Add user defined callback for Active Message.

This routine installs a user defined callback to handle incoming Active Messages with a specific id. This callback is called whenever an Active Message that was sent from the remote peer by @ref ucp_am_send_nb is received on this worker.

@param [in] worker UCP worker on which to set the Active Message handler. @param [in] id Active Message id. @param [in] cb Active Message callback. NULL to clear. @param [in] arg Active Message argument, which will be passed in to every invocation of the callback as the arg argument. @param [in] flags Dictates how an Active Message is handled on the remote endpoint. Currently only UCP_AM_FLAG_WHOLE_MSG is supported, which indicates the callback will not be invoked until all data has arrived.

@return error code if the worker does not support Active Messages or requested callback flags.