pub unsafe extern "C" fn nanocoap_sock_request_cb(
    sock: *mut nanocoap_sock_t,
    pkt: *mut coap_pkt_t,
    cb: coap_request_cb_t,
    arg: *mut c_void
) -> ssize_t
Expand description

@brief Simple synchronous CoAP request with callback

     The response will be handled by a callback, which avoids copying the
     response packet out of the network stack internal buffer.

@param[in] sock socket to use for the request @param[in,out] pkt Packet struct containing the request. Is reused for the response @param[in] cb Callback executed for response packet @param[in] arg Optional callback argumnent

@returns length of response on success @returns <0 on error