riot_sys

Function sock_udp_set_cb

Source
pub unsafe extern "C" fn sock_udp_set_cb(
    sock: *mut sock_udp_t,
    cb: sock_udp_cb_t,
    cb_arg: *mut c_void,
)
Expand description

@brief Gets the asynchronous event context from sock object

@pre (sock != NULL)

@warning Never handle the callback in the caller’s context! You might block the operation of the network stack with that.

@note Only available with @ref SOCK_HAS_ASYNC defined.

@param[in] sock A UDP sock object. @param[in] cb An event callback. May be NULL to unset event callback. @param[in] cb_arg Argument to provide to @p cb