Xdeon / ecoap

0 stars 1 forks source link

Refactor DTLS #4

Open Xdeon opened 5 years ago

Xdeon commented 5 years ago

Currently we use simple listener supervisor + acceptor/connection state machine to handle DTLS. This structure does not differ process busy accepting and process already connected. Also it is hard to track e.g. number of connections, as accepting is a blocking operation.

Furthermore, reconnecting logic is absent because we are unclear about how the client would react in such a scenario (consider what to do when the device went into sleep mode).

Xdeon commented 5 years ago

We need to determine lifecycle of process when DTLS is used. For instance, shall we terminate the socket process because the endpoint is inactive?