Exception handling
daniel-lerch opened this issue · 0 comments
daniel-lerch commented
The Skynet server needs a new concept to handle disconnects. Exceptions that occur while receiving the next packet are easy to handle. Sending a packet on the other hand happens asynchronously which makes it very dangerous to dispose objects.
Subsequent send calls should be omitted after a disconnect and packet sources should be disposed in order not to waste resources. To achieve this goal it might be necessary to inform several components about a disconnect. Generally, packets that could not be delivered can be discarded without notice as the protocol does not require the client to receive all packets that were sent by the server.