[ENet-discuss] How should fragmenting reliable packets work?

Chris Jurney jurney at gmail.com
Tue Sep 14 11:20:24 PDT 2010


How is fragmentation for reliable packets supposed to work?  Here's the
problem I'm having... in enet_protocol_send_reliable_outgoing_commands, I
have a packet for send that is bigger than the mtu.  When I get to this
code:

       if (outgoingCommand -> packet != NULL)
       {
          if (peer -> reliableDataInTransit + outgoingCommand ->
fragmentLength > peer -> windowSize)
            break;

          if ((enet_uint16) (peer -> mtu - host -> packetSize) <
(enet_uint16) (commandSize + outgoingCommand -> fragmentLength))
          {
             host -> continueSending = 1;

             break;
          }
       }

The function gives up on my packet because it's too big in that second
test.  The problem is that because it's set the continueSending bit, the
function that called this one (enet_protocol_send_outgoing_commands) tries
again, but without having made any changes to my oversize packet.  Where
should fragmentation based on mtu be happening for this guy?

Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20100914/1995c590/attachment-0001.html>


More information about the ENet-discuss mailing list