gcoap: provide migration alias for gcoap_req_send2

This commit is contained in:
Martine Lenders 2019-04-25 13:40:58 +02:00
parent a11f817604
commit d7ad4b9b5f

View File

@ -596,6 +596,27 @@ size_t gcoap_req_send(const uint8_t *buf, size_t len,
const sock_udp_ep_t *remote,
gcoap_resp_handler_t resp_handler);
/**
* @brief Sends a buffer containing a CoAP request to the provided endpoint
*
* @deprecated Migration alias for @ref gcoap_req_send(). Will be removed after
* the 2020.01 release.
*
* @param[in] buf Buffer containing the PDU
* @param[in] len Length of the buffer
* @param[in] remote Destination for the packet
* @param[in] resp_handler Callback when response received, may be NULL
*
* @return length of the packet
* @return 0 if cannot send
*/
static inline size_t gcoap_req_send2(const uint8_t *buf, size_t len,
const sock_udp_ep_t *remote,
gcoap_resp_handler_t resp_handler)
{
return gcoap_req_send(buf, len, remote, resp_handler);
}
/**
* @brief Initializes a CoAP response packet on a buffer
*