[ENet-discuss] Incomplete/concatenated packets?

Ruud van Gaal ruud at racer.nl
Thu Aug 18 07:08:35 PDT 2011


Eh, I meant 'like with TCP' (HTTP for example).
Ruud

On Thu, Aug 18, 2011 at 4:08 PM, Ruud van Gaal <ruud at racer.nl> wrote:

> Are you saying you're seeing this happen? I'd think not.
> One UDP packet is really a contained entity, not a stream like with UDP. So
> 2 individual packets never merge on the other side, unless you explicitly
> would do the merging in your own code.
>
> Cheers,
> Ruud
>
>
> On Thu, Aug 18, 2011 at 3:14 PM, Sebastian Ahlman <
> sebastian.ahlman at mbnet.fi> wrote:
>
>> Hey guys, first time poster here. Wonderful lib you have created.
>>
>> One (possibly stupid) question though. I could not find any answer to
>> this.
>>
>> Is it possible that the receiving peer only receives part of a packet or
>> multiple packets at the same time? Eg. if I send a packet with
>>
>> ENetPacket *packet = enet_packet_create ("hello", strlen ("hello") + 1,
>> ENET_PACKET_FLAG_RELIABLE);
>>
>> ...and then send another one from the same sender to the same receiver
>> with...
>>
>> ENetPacket *packet = enet_packet_create ("world", strlen ("world") + 1,
>> ENET_PACKET_FLAG_RELIABLE);
>>
>> ...is it possible that the receiving peer only receives "hel"? Or
>> "helloworld"?
>> What about "hellowo"?
>>
>> Also, does the ENET_PACKET_FLAG_RELIABLE affect this? I know that if I
>> don't
>> specify the flag there is no guarantee that the packet will make it's way
>> through at all, but what about partial or "concatenated" packets?
>>
>> The reason I am asking is because I have implemented a simple RPC system
>> on top
>> of enet, and currently I just blindly expect one ENetPacket to be exactly
>> one
>> RPC command. Is this safe to do?
>>
>> Thanks!
>>
>> //Sebastian
>>
>> _______________________________________________
>> ENet-discuss mailing list
>> ENet-discuss at cubik.org
>> http://lists.cubik.org/mailman/listinfo/enet-discuss
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20110818/aa02316a/attachment.html>


More information about the ENet-discuss mailing list