enet icon indicating copy to clipboard operation
enet copied to clipboard

enet host service not calling often

Open bobi6666 opened this issue 1 year ago • 2 comments

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?

bobi6666 avatar Oct 08 '23 22:10 bobi6666

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.

dimage1 avatar Mar 20 '24 10:03 dimage1

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?

bobi6666 avatar Mar 20 '24 11:03 bobi6666