Hmm...
I worry, if it's broadcasted or otherwise reused, and the last deref
occurs from a disconnection,
or if code holds its own reference and later destroys it (for example if
it is wrapping the packet
in a smart pointer on the stack when it calls Service) it will say it
hasn't been sent.
So it'd definitely need to happen independent of the dereferencing...
Perhaps when
the last fragment is removed wasSent?
James
On 2/27/2013 9:35 AM, Lee Salzman wrote:
Okay, ENET_PACKET_FLAG_SENT lives! MUAHAHAUAHA... er, anyway, it's in. :)
On Wed, Feb 27, 2013 at 4:23 PM, Lee Salzman <[email protected]
<mailto:[email protected]>> wrote:
This gave me a stupid idea, that seems like an ideal solution...
Technically with the freeCallback you can't distinguish between
sent or dropped packets without some hackery. But there is a
stupid simple way to support this...
I could just add something like ENET_PACKET_FLAG_SENT, which gets
added onto the packet's flags when it's reference count drops to
zero from the send queue.
This way you can just check in the freeCallback if it got sent or
not by looking at the flags. This will be in git shortly. :)
On Wed, Feb 27, 2013 at 4:10 PM, Thorbjørn Lindeijer
<[email protected] <mailto:[email protected]>> wrote:
On Wed, Feb 27, 2013 at 2:50 PM, Syed Setia Pernama
<[email protected] <mailto:[email protected]>> wrote:
> Here is the thread:
>
http://lists.cubik.org/pipermail/enet-discuss/2012-May/thread.html#1888
> And then answer (a bit hack):-
>
http://lists.cubik.org/pipermail/enet-discuss/2012-May/001887.html
To avoid confusion, the answer about using freeCallback was
actually over here:
http://lists.cubik.org/pipermail/enet-discuss/2012-May/001888.html
Cheers,
Bjørn
_______________________________________________
ENet-discuss mailing list
[email protected] <mailto:[email protected]>
http://lists.cubik.org/mailman/listinfo/enet-discuss
_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss
_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss