[ENet-discuss] Timeout after force disconnected

Marcin Zajączkowski mszpak at wp.pl
Wed Mar 31 12:56:23 PST 2004

Dnia 2004-03-29 22:41, Użytkownik Lee Salzman napisał:
> ENet uses a progressive timeout scheme. Initially, it gives all packets
> a window of (RTT + variance) to reply with an acknowledgement.
> Should no acknowledgement be delivered during this period, it will
> double this time window and resend the packet. If the window exceeds
> ENET_PEER_TIMEOUT_LIMIT*RTT it will finally disconnect.

After your hints and study the code, now I know why it waits about 75 
seconds in my case!

> Firstly, the cumulative amount of time spent waiting for an
> acknowledgement would be maintained, rather than just the current
> acknowledgement window. Then...

> 1) compare this cumulative time to a fixed constant, regardless of RTT
> 2) compare this cumulative time to ENET_PEER_TIMEOUT_LIMIT*RTT

I also think that compare cumulative amount of time will work better.
To the second part, I think that compare to ENET_PEER_TIMEOUT_LIMIT*RTT 
will be better because of fact that library could work with different 
network's connections (e.g. long ping) and fixed timeout could disallow 
any communication with that peers.
Otherwise we should consider for what appliances ENet will be use. In 
normal case developer can take tcp. In my opinion ENet is handy for 
appliances required fast reliable and/or unreliable connections. So I 
think developer should be able to choose his/her way (depend what he/she 
Additionally value respondents to ENET_PEER_TIMEOUT_LIMIT could be allow 
to change by developer.

Thanks for help

More information about the ENet-discuss mailing list