TCP handled a good chunk of the connection/disconnection logic. With UDP, this will need to be implemented manually.
This includes:
[x] Implementing the connection logic. This will be similar as users already needed to send a connection message.
[x] Implementing a graceful disconnect. This will also be similar to before, as this is done by sending a special disconnect message.
[x] Detecting a dropped conneciton. This is more difficult. Before, TCP told us the connection was closed. Now we need to keep track of the last time we heard from the peer and if that crosses a threshold we mark the connection as dropped.
TCP handled a good chunk of the connection/disconnection logic. With UDP, this will need to be implemented manually. This includes: