diff --git a/os/net/app-layer/coap/coap-callback-api.h b/os/net/app-layer/coap/coap-callback-api.h index 7f144af96..69ceea4f5 100644 --- a/os/net/app-layer/coap/coap-callback-api.h +++ b/os/net/app-layer/coap/coap-callback-api.h @@ -65,6 +65,14 @@ struct coap_request_state { void (*callback)(coap_request_state_t *state); }; +/** + * \brief Send a CoAP request to a remote endpoint + * \param state The state to handle the CoAP request + * \param endpoint The destination endpoint + * \param request The request to be sent + * \param callback callback to execute when the response arrives or the timeout expires + * \return 1 if there is a transaction available to send, 0 otherwise + */ int coap_send_request(coap_request_state_t *state, coap_endpoint_t *endpoint, coap_message_t *request, void (*callback)(coap_request_state_t *state));