Using UDP
CoAP optimizes this drastically, changing two things. First, it uses UDP instead of TCP. In UDP, IP packets, called datagrams, are not acknowledged or ordered as they are in TCP. This means that datagrams can get lost or be received in a different order compared to when they were sent. Such considerations must be handled by CoAP implementations. While CoAP manages acknowledgements also, it is optional. This means that the application has the option of using the unacknowledged service when sending data. This saves a lot of network traffic, especially in cases where loss of datagrams is acceptable.
This is typically the case, for instance, with sensors measuring analog ambient values that regularly report their status. If a value ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access