In actual implementation, transport (UDP) / messaging / request/response layers are not explicitly separated.
Implementing the following features is therefore complex:
code testing: tests need to open real UDP ports, which may cause false negatives
different transport implementations: DTLS, websocket, TCP, test
correct implementation of timeouts: CoAP defines a lot of different timeouts, at different layers. Not implementing them correctly lead to process/memory leaking, in particular. Specs defines timeouts per layer, so should be the implementation
Rationale
In actual implementation, transport (UDP) / messaging / request/response layers are not explicitly separated.
Implementing the following features is therefore complex:
Proposal
Transport
?Connection
?GenStateMachine
for implementing those 2 layers: provides off the shelf timeout handling and more explicit state machine modelling (see https://tools.ietf.org/id/draft-ietf-lwig-coap-05.html#rfc.section.2.5)