ChaseHuegel / swordfish-engine

C# engine built on ECS and multithreading with high performance and modding in mind. Targeting PBR-based Low-Fi and 2.5D visuals with VR support!
Apache License 2.0
4 stars 0 forks source link

Handle disconnecting #60

Closed ChaseHuegel closed 1 year ago

ChaseHuegel commented 2 years ago

This should be done 2 ways: 1) A DisconnectPacket for safe disconnects that clients send on Disconnect() 2) A configurable timeout period on sessions that NetControllers track. If the period has elapsed since the last packet received from the respective session, send a reliable PingPacket. If it isn't sent back, consider the connection lost and invoke Disconnect().