enet
enet copied to clipboard
enet host service not calling often
hello, I noticed that if I have an enet server and a client and I use host service 0 on the server, but the main game server loop has a wait timer of, for example, 10 or 20 ms, so if some client times out, I don't always get a disconnect event on the server, I would like to know how that can be solved?
Hi, server should eventually understand about a client disconnection based on absence of reliable packets acknowledges. Checking those config params can help you to find a real cause of your issue: checkTimeouts
(1), timeoutMinimum
(eg 5000), timeoutMaximum
(eg 8000), pingInterval
(eg 1000). With such params it can take up to 8 seconds for server to realize that there is no client any more.
currently i have settings in rust like this: enet_peer_ping_interval(event.peer, 700); enet_peer_timeout(event.peer, 32, 15000, 20000); and it works niw t notifies me of disconnection but i am still not sure what caused this before? default settings or something else?