[ENet-discuss] If it possible to know if a packet has been delivered ?
lsalzman at gmail.com
Fri May 25 06:15:19 PDT 2012
Well, a stupid simple way of doing this cleanly if you don't mind hacking
the code a bit:
Take a look into enet_protocol_remove_sent_reliable_command(). If you check
near the bottom there is a bit that looks like:
if (outgoingCommand -> packet != NULL)
You could just do something in there to notify your app that packet has
been acknowledged. Ignore the siren's song of the "wasSent" var, it's not
actually relevant for this, though.
On Fri, May 25, 2012 at 5:32 AM, Thorbjørn Lindeijer <bjorn at lindeijer.nl>wrote:
> On Fri, May 25, 2012 at 2:26 PM, Lee Salzman <lsalzman at gmail.com> wrote:
> > ENET_EVENT_TYPE_RECEIVE. Don't be silly, man. :)
> That is "a packet has been received from a peer", while I'm sure
> Emmanuel was asking about a way of knowing whether a sent packet has
> arrived at the target peer. :)
> - Bjørn
> > On Fri, May 25, 2012 at 12:36 AM, Emmanuel Rivoire <manu.n02 at laposte.net
> > wrote:
> >> Hello,
> >> is there an easy way to know if a reliable packet has been delivered ?
> >> Checking the current value of
> >> ENetPeer::channels[PacketChannel].outgoingReliableSequenceNumber just
> >> have called enet_host_service() , and then waiting to get that value (or
> >> above) in
> >> would be enough to do the trick ?
> > _______________________________________________
> > ENet-discuss mailing list
> > ENet-discuss at cubik.org
> > http://lists.cubik.org/mailman/listinfo/enet-discuss
> ENet-discuss mailing list
> ENet-discuss at cubik.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ENet-discuss