If one raw UDP packet gets lost, it is almost certain any other UDP packets following right behind it will get lost too, if there is some issue like full buffers or momentarily bad link, so there is no real advantage in terms of reducing packet loss to putting each command in its own UDP packet. That and it would be tremendously wasteful of bandwidth and the router's processing power to just bombard it with a bunch of UDP packets. In other words, batching is good, not batching is bad.<br>
<br><div class="gmail_quote">On Tue, Aug 7, 2012 at 2:04 AM, JiangHao <span dir="ltr"><<a href="mailto:jaxecn@gmail.com" target="_blank">jaxecn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
hi,<div>    i have posted a mail about the flow of send data,and i know the flow of send data.</div><div>    If I'm not mistaken,the enet put  a batch of the current peer's commands into host->buffer array,and call 'enet_socket_send'</div>


<div>    that's means a udp packet contain a batch of commands,and the command is made when we send some data to peer or something else.these commands aways has a reliable sequence number witch is used in the reliability of the udp realization.</div>


<div>    you know, if a udp packet' size is too large,the udp packet will be  divided into multiple IP packet, and for the receiver ,the UDP packet may be dropped if some IP packets is lost. this means that a batch of the commands may be dropped and enet will have to resend these command.</div>


<div>   I want to know why each command put in a UDP packet ,avoid a batch of the command the possibility of loss.</div><div>   </div><div>    </div><div><br></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>