[ENet-discuss] ENET_DISCONNECT_EVENT

Lee Salzman lsalzman1 at cox.net
Fri Jan 20 11:46:40 PST 2006


It sounds like you're not servicing the host for those 16,000 ms. That's 
pretty much what would cause that.

Lee

Doug Kimzey wrote:
> After an eNet client establishes a connection to an eNet Host, the 
> client is disconnected after approximately 30 seconds.  We have traced 
> this on the host side to a call to enet_peer_reset in the 
> enet_protocol_check_timeouts(…) function:
> 
>  
> 
>        if (outgoingCommand -> roundTripTimeout >= outgoingCommand -> 
> roundTripTimeoutLimit)
> 
>        {
> 
>           event -> type = ENET_EVENT_TYPE_DISCONNECT;
> 
>           event -> peer = peer;
> 
>  
> 
>           enet_peer_reset (peer);
> 
>  
> 
>           return 1;
> 
>        }
> 
>  
> 
>  
> 
> In this case the roundTripTimeout equals the roundTripTimeoutLimit of 
> 16,000 ms (or 16 seconds).  
> 
>  
> 
> I have added a call from the client application to enet_peer_ping(…) 
> that is on a timer to fire every 2 seconds – but the disconnect still 
> occurs.  The host runs a perpetual loop that calls enet_host_service(…).
> 
>  
> 
> Would you have any suggestions or recommendations?
> 
>  
> 
> One thing I noticed from the Cube Legends source is that they added a 
> PING / PONG message so that whenever a PING message is received on the 
> server, it immediately does an enet_peer_send of a PONG message back to 
> the client.  Are there other and better ways to handle “keep-alive” packets?
> 
>  
> 
> -Doug
> 
>  
> 
>  
> 
> Doug Kimzey
> 
> Software Developer
> 
> DPRA DEFENSE SYSTEMS GROUP
> 
> 10215 Technology Drive, Suite 201
> 
> Knoxville, Tennessee 37932-3344
> 
>  
> 
> Phone:   865.218.4237
> 
> Cell:        865.382.0307
> 
>  
> 
> Email:    doug.kimzey at dpra.com
> 
> Home:     mdkimzey at comcast.net
> 
> www.defensesystemsgroup.com
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss



More information about the ENet-discuss mailing list