<div dir="ltr">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 <span style="color:rgb(0,0,0);font-family:Roboto,sans-serif;font-size:14px;line-height:19px;background-color:rgb(249,250,252)">timeoutMinimum amount of time has to expire before the disconnect event is sent.  (And up to </span><span style="color:rgb(0,0,0);font-family:Roboto,sans-serif;font-size:14px;line-height:19px;background-color:rgb(249,250,252)">timeoutMaximum.)  So if after connecting you call enet_timeout_peer(peer, </span><span style="color:rgb(0,0,0);font-family:Roboto,sans-serif;font-size:14px;line-height:19px">ENET_PEER_TIMEOUT_LIMIT, 500, 1000); you would receive a disconnect within 1.5 seconds.</span></div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 17, 2013 at 4:12 AM, Sebastian Ahlman <span dir="ltr"><<a href="mailto:sebastian.ahlman@gmail.com" target="_blank">sebastian.ahlman@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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?<div>


<br></div><div>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.</div>


<div><br></div><div>Thanks!</div></div>
<br>_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br></blockquote></div><br></div>