Does the unreliable version of your code converge after a longer period, perhaps? Try running it for a minute or two and compare the results.<div><br></div><div>- Blair<br><br><div class="gmail_quote">On Wed, Jul 14, 2010 at 4:30 PM, Philip Bennefall <span dir="ltr">&lt;<a href="mailto:philip@u7142039.fsdata.se">philip@u7142039.fsdata.se</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">





<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hi Blair,</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">What I&#39;m doing as a test is to set up 
both a server and a client using ENet, connected through localhost. The server 
echos back anything it receives, and the client prints out statistics after 10 
seconds.</font></div><div class="im">
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Kind regards,</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Philip <font face="Times New Roman" size="3">Bennefall</font></font></div>
<div>----- Original Message ----- </div>
</div><blockquote style="padding-right:0px;padding-left:5px;margin-left:5px;border-left:#000000 2px solid;margin-right:0px"><div class="im">
  <div style="background:#e4e4e4;font:10pt arial"><b>From:</b> 
  <a title="thynameisblair@chaosandcode.com" href="mailto:thynameisblair@chaosandcode.com" target="_blank">Blair Holloway</a> </div>
  <div style="font:10pt arial"><b>To:</b> <a title="enet-discuss@cubik.org" href="mailto:enet-discuss@cubik.org" target="_blank">enet-discuss@cubik.org</a> </div>
  </div><div><div></div><div class="h5"><div style="font:10pt arial"><b>Sent:</b> Wednesday, July 14, 2010 8:23 
  AM</div>
  <div style="font:10pt arial"><b>Subject:</b> Re: [ENet-discuss] Some ENet 
  issues</div>
  <div><br></div>Generally, no. 500ms should be adequate; pinging more 
  frequently is just going to take up more bandwidth from ping responses 
  (reliable acks).
  <div><br></div>
  <div>What are you using for comparison as a &quot;valid&quot; ping? The output of your 
  platform&#39;s ping command?</div>
  <div><br></div>
  <div>- Blair<br><br>
  <div class="gmail_quote">On Wed, Jul 14, 2010 at 3:25 PM, Philip Bennefall <span dir="ltr">&lt;<a href="mailto:philip@u7142039.fsdata.se" target="_blank">philip@u7142039.fsdata.se</a>&gt;</span> 
  wrote:<br>
  <blockquote class="gmail_quote" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:#ccc 1px solid">
    <div bgcolor="#ffffff">
    <div><font face="Arial" size="2">Hi Blair,</font></div>
    <div><font face="Arial" size="2"></font> </div>
    <div><font face="Arial" size="2">Do you think it&#39;d be a good idea to decrease 
    the ping interval? Maybe to 200 milliseconds?</font></div>
    <blockquote style="padding-right:0px;padding-left:5px;margin-left:5px;border-left:#000000 2px solid;margin-right:0px">
      <div style="font:10pt arial"> </div>
      <div style="font:10pt arial">Kind regards,</div>
      <div style="font:10pt arial"> </div>
      <div style="font:10pt arial">Philip Bennefall</div>
      <div>
      <div></div>
      <div>
      <div style="font:10pt arial">----- Original Message ----- </div>
      <div style="background:#e4e4e4;font:10pt arial"><b>From:</b> <a title="thynameisblair@chaosandcode.com" href="mailto:thynameisblair@chaosandcode.com" target="_blank">Blair 
      Holloway</a> </div>
      <div style="font:10pt arial"><b>To:</b> <a title="enet-discuss@cubik.org" href="mailto:enet-discuss@cubik.org" target="_blank">enet-discuss@cubik.org</a> </div>
      <div style="font:10pt arial"><b>Sent:</b> Wednesday, July 14, 2010 7:06 
      AM</div>
      <div style="font:10pt arial"><b>Subject:</b> Re: [ENet-discuss] Some ENet 
      issues</div>
      <div><br></div>By default, Enet sends (reliable) ping packets every 500ms, 
      if no other reliable traffic was sent in that interval. If you&#39;re sending 
      reliable packets 30 times per second instead of 2 times, it&#39;s possible 
      Enet is deriving a more accurate average round trip time. 
      <div><br></div>
      <div>- Blair<br><br>
      <div class="gmail_quote">On Wed, Jul 14, 2010 at 2:45 PM, Philip Bennefall 
      <span dir="ltr">&lt;<a href="mailto:philip@u7142039.fsdata.se" target="_blank">philip@u7142039.fsdata.se</a>&gt;</span> wrote:<br>
      <blockquote class="gmail_quote" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:#ccc 1px solid">
        <div bgcolor="#ffffff">
        <div><font face="Arial" size="2">Hi Lee and others,</font></div>
        <div><font face="Arial" size="2"></font> </div>
        <div><font face="Arial" size="2">I am having some minor issues with 
        ENet.</font></div>
        <div><font face="Arial" size="2"></font> </div>
        <div><font face="Arial" size="2">First, I&#39;m trying to get the average up and 
        downstream for each peer by using the appropriate data 
        fields in the peer structure but it always returns 0 for some 
        reason. The same seems to be true with the host structure as 
        well.</font></div>
        <div><font face="Arial" size="2"></font> </div>
        <div><font face="Arial" size="2">Second, when I look at the average round 
        trip time for a peer, this value is only correct if I send out a few 
        reliable packets. on localhost, for instance, I ran a test where I sent 
        30 unreliable packets every second. I poll the network every 5 
        milliseconds, but got an average round trip of 44 milliseconds. When I 
        changed it to reliable packets, however, I got an average of 12 which 
        seems much more reasonable. Is this intended behavior?</font></div>
        <div><font face="Arial" size="2"></font> </div>
        <div><font face="Arial" size="2">Thanks in advance for any 
help.</font></div>
        <div><font face="Arial" size="2"></font> </div>
        <div><font face="Arial" size="2">Kind regards,</font></div>
        <div><font face="Arial" size="2"></font> </div><font color="#888888">
        <div><font face="Arial" size="2">Philip 
        Bennefall</font></div></font></div><br>_______________________________________________<br>ENet-discuss 
        mailing list<br><a href="mailto:ENet-discuss@cubik.org" target="_blank">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></div></div>
      <p></p>
      <hr>

      <p></p><br>Internal Virus Database is out of date.<br>Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a> <br>Version: 
      8.5.432 / Virus Database: 271.1.1/2662 - Release Date: 02/01/10 
      12:37:00<br>
      <p></p></blockquote></div><br>_______________________________________________<br>ENet-discuss 
    mailing list<br><a href="mailto:ENet-discuss@cubik.org" target="_blank">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>
  <p>
  </p><hr>

  <p></p><br>Internal Virus Database is out of date.<br>Checked by AVG - 
  <a href="http://www.avg.com" target="_blank">www.avg.com</a> <br>Version: 8.5.432 / Virus Database: 271.1.1/2662 - Release 
  Date: 02/01/10 12:37:00<br><p></p></div></div></blockquote></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>