Function riot_sys::sock_tcp_set_cb

source ·
pub unsafe extern "C" fn sock_tcp_set_cb(
    sock: *mut sock_tcp_t,
    cb: sock_tcp_cb_t,
    cb_arg: *mut c_void
)
Expand description

@brief Sets event callback for @ref sock_tcp_t

@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 TCP 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. May be NULL.