[ENet-discuss] ENET_DISCONNECT_EVENT
Doug Kimzey
doug.kimzey at dpra.com
Fri Jan 20 09:36:30 PST 2006
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cubik.org/pipermail/enet-discuss/attachments/20060120/72f92161/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 3173 bytes
Desc: image001.jpg
Url : http://lists.cubik.org/pipermail/enet-discuss/attachments/20060120/72f92161/attachment.jpeg
More information about the ENet-discuss
mailing list