[ENet-discuss] Optimizing ENet Protocol ?

Lee Salzman lsalzman at gmail.com
Thu May 24 06:27:43 PDT 2012


On Thu, May 24, 2012 at 5:47 AM, manu.n02 <manu.n02 at laposte.net> wrote:

>
> I assure you, packets are aggregated, even unsequenced ones.
>
> Oh, yup, I found it, there's a "while (currentData < & host ->
> receivedData [host -> receivedDataLength])" in
> enet_protocol_handle_incoming_commands() ..!
>
> But if I call enet_host_flush() after each enet_peer_send(), I'll get
> exactly 1 ENet message for 1 enet_socket_receive(), right ?
> So in that case, I could remove the dataLenght ..?
>

Not unless you have some way of validating message length on your own, no.
As I discussed previously, UDP provides NO guarantees the length of the
message you sent is what you're going to get.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20120524/91686581/attachment.html>


More information about the ENet-discuss mailing list