[ENet-discuss] Optimizing ENet Protocol ?
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...
More information about the ENet-discuss