[ENet-discuss] Two back-to-back send calls not allowed?
Jay Sprenkle
jsprenkle at gmail.com
Wed Aug 11 14:15:55 PDT 2010
I think you may need to either wait until the first packet is sent to write
the second one, or create a separate m_EntityUpdate object for the second
packet. It hasn't sent the first one before you write over it with the
second one.
On Wed, Aug 11, 2010 at 3:31 PM, Richard Becker <richard_3d at hotmail.com>wrote:
> Can someone please tell me why the following code will not work? The send
> function is just an abstraction for ease of use. basically the first
> argument tells enet to broadcast, the bools at the end are for flags, in
> this case we are asking for sequenced only (not reliable).
> Both of these calls occur in the same "frame" or update() call. The problem
> is my client only gets the last message with the value of 3 for the number
> of entities? Any help here would be greatly appreciated - Richard
>
> m_EntityUpdate.uiNumEntities = 5;
> SendPacket(-1, &m_EntityUpdate, sizeof(tServerEntityUpdate),
> CHANNEL_WORLD_UPDATE, false, true, false);
>
> m_EntityUpdate.uiNumEntities = 3;
> SendPacket(-1, &m_EntityUpdate, sizeof(tServerEntityUpdate),
> CHANNEL_WORLD_UPDATE, false, true, false);
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20100811/633c41f0/attachment.html>
More information about the ENet-discuss
mailing list