[ENet-discuss] Increase timeout delay

Ruud van Gaal ruud at racer.nl
Thu Feb 18 15:26:48 PST 2010


...
> I just started with enet. I made a serer and a client and 
> everything works as expected. I know that I need to call 
> enet_host_service on both sides to make sure that the 
> communication works properly. But it so happens that my 
> client can have large periods of time, when it does not call 
> enet_host_service, and, therefore, the server then treats the 
> peer as disconnected. How can I increase the timeout delay to 
> treat the peer as disconnected?

In enet.h, modify these:

   ENET_PEER_TIMEOUT_MINIMUM              = 5000,
   ENET_PEER_TIMEOUT_MAXIMUM              = 30000,

to higher values.

Ruud



More information about the ENet-discuss mailing list