<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Why don't you guys just use ENET_PACKET_FLAG_UNSEQUENCED for unordered
packet delivery<br>
without using so many channels? Just wondering if i'm doing something
wrong :)<br>
<br>
Luis Cabellos wrote:
<blockquote cite="mid442CEF3D.5000605@tragnarion.com" type="cite">
  <pre wrap="">Well, in the server I don't discriminate among the channel that the 
packet came from. So in the server I treat all packets the same way. 
Enet use the channels to mantain the order of packets. All the packets 
in the same channel are in-order, and if one of the packets arrive at 
server too later, it will be dropping and wait for acknowledgment.So if 
you know that the packets don't need the order, the use of a range of 
channels

Let me show one ASCII example :)

    When you use on channel
    Send:
     1 2 3 4 5 6 7 8 9 10 11 12  -&gt; channel 1

    Receive:
     1 2 [&gt;&gt; 4 5 3 &lt;&lt;] 6 7 8 9 10 11 12  -&gt;channel 1
     -&gt; Enet drop 4 and wait for arrive of 3

    And when you use 3 channels, [ min = 1 , max = 3 ]
    Send:
     1     4     7     10        -&gt; channel 1
       2     5     8      11     -&gt; channel 2
         3     6     9       12  -&gt; channel 3

    Receive
     1   4       7     10        -&gt; channel 1
       2   5       8      11     -&gt; channel 2
             3 6     9       12  -&gt; channel 3
     -&gt; And you get 1 2 4 5 3 6 7 8 9 10 11 12 without drop / wait

So the client is the only that change the lenght of the range of 
channels, with a long range less probability of out-of-order. And the 
change of the number of channels if you maintain that ( min &lt;= max ) it 
will be always one channel at least. In the other hand, if you increase 
the range, I think that the server will not slow down too much with the 
use of more channels.

- Luis | Tragnarion

Paul Collier wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">I'm curious about setting the range of channels. Is there any way to
set it other than by the client at connection establishment? If
someone tried to clone a program's protocol with enet but changed the
number of channels, could this possibly affect the behaviour of the
server you were running? (i.e. they set it to zero--could this break
the server network code? Or perhaps they set it to a very high
number--could this slow down the server?) Enet seems to be pretty good
about security from what I've seen, in any case.

- Paul

On 3/30/06, Luis Cabellos <a class="moz-txt-link-rfc2396E" href="mailto:lists@tragnarion.com">&lt;lists@tragnarion.com&gt;</a> wrote:
 

    </pre>
    <blockquote type="cite">
      <pre wrap="">You can send Unordered packets using a range of channels and send the
packets sequentially in those channels. e.g: If you reserve [min, max] for
unordered send, the next code snip will work like an unordered send.

    packet = enet_packet_create( msg, size, ENET_PACKET_FLAG_RELIABLE );
    enet_peer_send( server, unorderedChannel, packet);
    ++this-&gt;unorderedChannel;
    if( unorderedChannel &gt; MAX_UNORDERED ) {
        unorderedChannel = MIN_UNORDERED;
    }

Luis | Tragnarion

      </pre>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->
_______________________________________________
ENet-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a>
<a class="moz-txt-link-freetext" href="http://lists.cubik.org/mailman/listinfo/enet-discuss">http://lists.cubik.org/mailman/listinfo/enet-discuss</a>

  </pre>
</blockquote>
</body>
</html>