[ENet-discuss] ENET_DISCONNECT_EVENT

Paul Collier paching at gmail.com
Fri Jan 20 13:23:40 PST 2006


ENet does its own keepalive stuff, I'm pretty sure. Forgive me if I'm
mistaken, but you didn't explicitly say that you were calling
enet_host_service() on the client regularily; could that be the problem?

On 1/20/06, Doug Kimzey <doug.kimzey at dpra.com> 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
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cubik.org/pipermail/enet-discuss/attachments/20060120/5e45dfd7/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3173 bytes
Desc: not available
Url : http://lists.cubik.org/pipermail/enet-discuss/attachments/20060120/5e45dfd7/image001.jpg


More information about the ENet-discuss mailing list