Internal details of the library. Not for public use. More...
Functions | |
| ErrorCode | sendUdp (UDP *udp, const uint8_t *data, size_t length, IPAddress ip, uint16_t port) |
| Wrapper around low level function to send raw UDP data. | |
| unsigned long | getRandomTimeout () |
| Get a random timeout value for retransmissions. | |
| size_t | getMinOptionBytes (uint32_t value) |
| Return the minimum number of bytes needed to represent the given value. | |
Internal details of the library. Not for public use.
| size_t Coap::Detail::getMinOptionBytes | ( | uint32_t | value | ) |
Return the minimum number of bytes needed to represent the given value.
Note that 0 is represented with 0 bytes, as per CoAP option encoding rules.
| value | The value to evaluate. |
| unsigned long Coap::Detail::getRandomTimeout | ( | ) |
Get a random timeout value for retransmissions.
Returns a random timeout value between COAP_ACK_MIN_TIMEOUT_MS and COAP_ACK_MAX_TIMEOUT_MS as per RFC 7252, Section 4.8.
| ErrorCode Coap::Detail::sendUdp | ( | UDP * | udp, |
| const uint8_t * | data, | ||
| size_t | length, | ||
| IPAddress | ip, | ||
| uint16_t | port ) |
Wrapper around low level function to send raw UDP data.
| udp | The UDP instance to use for sending data. |
| data | Pointer to the data to send. |
| length | Length of the data in bytes. |
| ip | Destination IP address. |
| port | Destination port number. |