Closed mikefoxTB closed 1 month ago
You can track this sort of information using an event
or nack
handler - see coap_handler(3). Relying on ICMP (COAP_NACK_ICMP_ISSUE
) is unsafe as it may be filtered out by a firewall. Non 2xx responses can get picked up in theresponse
handler. Otherwise, as networks can be 'lossy', it is not safe to assume that 1 missed response means that the server has gone down, but counting COAP_EVENT_MSG_RETRANSMITTED
may help you here.
@mikefoxTB Closing this issue as information provided. It can be re-opened if there are still questions about this.
What is a good way for a client to detect a failed confirmed request (get or put) as soon as possible? One way is to wait for a response, but this might take two confirmed timeouts or about 3 minutes, however there are a lot of cases where a failed request could be detected sooner, ICMP port closed, non 2xx errors etc. How can a client quickly determine a request did not complete?