gcoap: remove deprecated function gcoap_req_send()
This commit is contained in:
parent
215d5cdc1c
commit
affd115405
@ -596,23 +596,6 @@ size_t gcoap_req_send2(const uint8_t *buf, size_t len,
|
|||||||
const sock_udp_ep_t *remote,
|
const sock_udp_ep_t *remote,
|
||||||
gcoap_resp_handler_t resp_handler);
|
gcoap_resp_handler_t resp_handler);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Sends a buffer containing a CoAP request to the provided host/port
|
|
||||||
*
|
|
||||||
* @deprecated Please use @ref gcoap_req_send2() instead
|
|
||||||
*
|
|
||||||
* @param[in] buf Buffer containing the PDU
|
|
||||||
* @param[in] len Length of the buffer
|
|
||||||
* @param[in] addr Destination for the packet
|
|
||||||
* @param[in] port Port at the destination
|
|
||||||
* @param[in] resp_handler Callback when response received, may be NULL
|
|
||||||
*
|
|
||||||
* @return length of the packet
|
|
||||||
* @return 0 if cannot send
|
|
||||||
*/
|
|
||||||
size_t gcoap_req_send(const uint8_t *buf, size_t len, const ipv6_addr_t *addr,
|
|
||||||
uint16_t port, gcoap_resp_handler_t resp_handler);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initializes a CoAP response packet on a buffer
|
* @brief Initializes a CoAP response packet on a buffer
|
||||||
*
|
*
|
||||||
|
|||||||
@ -707,20 +707,6 @@ ssize_t gcoap_finish(coap_pkt_t *pdu, size_t payload_len, unsigned format)
|
|||||||
return pdu->payload_len + (pdu->payload - (uint8_t *)pdu->hdr);
|
return pdu->payload_len + (pdu->payload - (uint8_t *)pdu->hdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t gcoap_req_send(const uint8_t *buf, size_t len, const ipv6_addr_t *addr,
|
|
||||||
uint16_t port, gcoap_resp_handler_t resp_handler)
|
|
||||||
{
|
|
||||||
sock_udp_ep_t remote;
|
|
||||||
|
|
||||||
remote.family = AF_INET6;
|
|
||||||
remote.netif = SOCK_ADDR_ANY_NETIF;
|
|
||||||
remote.port = port;
|
|
||||||
|
|
||||||
memcpy(&remote.addr.ipv6[0], &addr->u8[0], sizeof(addr->u8));
|
|
||||||
|
|
||||||
return gcoap_req_send2(buf, len, &remote, resp_handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t gcoap_req_send2(const uint8_t *buf, size_t len,
|
size_t gcoap_req_send2(const uint8_t *buf, size_t len,
|
||||||
const sock_udp_ep_t *remote,
|
const sock_udp_ep_t *remote,
|
||||||
gcoap_resp_handler_t resp_handler)
|
gcoap_resp_handler_t resp_handler)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user