[ENet-discuss] roundTripTimeoutLimit with big ENET_PEER_TIMEOUT_LIMIT

Alain Becam Al at theGiantBall.com
Thu Nov 5 05:03:36 PST 2009


Hello,
     Greetings from a new happy user. We are using ENet has the "low-level"
communication API for an object-oriented solution, with object replication.
Thanks for this great library !

Mostly for debug purposes, we increased the TIME_OUT, like that:

   ENET_PEER_TIMEOUT_LIMIT                = 3200, // 32
   ENET_PEER_TIMEOUT_MINIMUM              = 5000, // 5000
   ENET_PEER_TIMEOUT_MAXIMUM              = 300000, // 30000

It works well to avoid too quick disconnections, but we still have a
problem. When a new peer connect, it receives the list of existing peers
from the server, then try to connect to all peers, and when done, send an
acknowledgment to the server. Then the server replicates the existing
objects. But with these time-out, a disconnected peer is discovered after a
very long time, and if a new peer connect, it will never send the ack to the
server (because he is waiting for the connection and until it receives the
disconnection event).

We tried to do that in protocol.c (line 1270):

outgoingCommand -> roundTripTimeoutLimit = (ENET_PEER_TIMEOUT_LIMIT/100) *
outgoingCommand -> roundTripTimeout;

But it seems to have some nasty side-effects (when some communications are
occurring, it might disconnect very quickly again)...

Any way to have a quick disconnection and still a long time-out for comms ?

Kind regards,
    Alain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20091105/f29abb78/attachment.htm>


More information about the ENet-discuss mailing list