I got it! The timeouts work as expected.
The problem is that I was giving the enet_host_service() timeout of 60 seconds and since there was no traffic to “wake-up” select() the expired packets are checked after the 60 seconds timeout expires. On Fri, Oct 25, 2013 at 11:53 AM, Ruud van Gaal <[email protected]> wrote: > You might want to check enet.h for ENET_PEER_TIMEOUT_MINIMUM and > ENET_PEER_TIMEOUT_MAXIMUM. > However, I also believed that the peer timeout could be set with a > function call the last couple of versions... > > Ruud > > > On Thu, Oct 24, 2013 at 11:09 PM, Krasimir Marinov <[email protected]>wrote: > >> Hi, >> >> First thanks for the nice library! >> >> I’ve a question related to tweaking the timeout on connect. >> >> I'd like the connection attempt to timeout, i.e. get DISCONNECT event, >> asap in the case of the "server" is missing, i.e. the peer host is not >> available. >> >> I've played with enet_peer_timeout(), setting different values on the >> peer returned from enet_host_connect() call, but this is w/o any effect - I >> get the DISCONNECT event after 60 seconds, no matter what values I pass to >> enet_peer_timeout(). >> >> Do I miss something? Is this the correct way to tweak the connect timeout? >> >> _______________________________________________ >> ENet-discuss mailing list >> [email protected] >> http://lists.cubik.org/mailman/listinfo/enet-discuss >> >> > > _______________________________________________ > ENet-discuss mailing list > [email protected] > http://lists.cubik.org/mailman/listinfo/enet-discuss > >
_______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
