That's because it's up to 500ms (Just going by what's below I haven't
checked if that's the actual value.) to send the ping that will notice the
other side isn't responding.  Then at least timeoutMinimum amount of time
has to expire before the disconnect event is sent.  (And up to timeoutMaximum.)
 So if after connecting you call enet_timeout_peer(peer,
ENET_PEER_TIMEOUT_LIMIT,
500, 1000); you would receive a disconnect within 1.5 seconds.


On Wed, Apr 17, 2013 at 4:12 AM, Sebastian Ahlman <
[email protected]> wrote:

> Allright, thanks. I will experiment with enet_peer_ping_interval(). It
> takes a lot longer than 500ms for the remaining peer to notice that the
> other one has died though. Is there something else that might affect this?
>
> I am working on a system where two processes will talk to each other
> within the same local network, so responsiveness is key here. I am not that
> worried about latency and lost packets since we are in the local network
> only.
>
> Thanks!
>
> _______________________________________________
> 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

Reply via email to