Yep, the freeCallback gets called when the ref count goes to zero. That's what it is for. :)
On Wed, Feb 27, 2013 at 3:46 PM, Syed Setia Pernama <[email protected]>wrote: > Actually within ENet there is undocumented callback that get triggered > when a reliable packet was succesfully received. Logically speaking, > ENet must know the packet has been received properly, otherwise ENet will > resend the packet (that is requirement for reliable packets). > > > ------------------------------ > *From:* Benoit Germain <[email protected]> > *To:* Discussion of the ENet library <[email protected]> > *Sent:* Wednesday, February 27, 2013 4:19 PM > *Subject:* Re: [ENet-discuss] enet 1.3.6 dll for .net > > > > 2013/2/26 James Bellinger <[email protected]> > > With either referenceCount or freeCallback, how are you differentiating > disconnection from acknowledge? > For example, enet_peer_disconnect (Peer.Disconnect) calls > enet_peer_reset_queues. > > > I don't. It happens that I haven't encountered a situation where I care > though, so I didn't think about it :-). > > > As a general thought: > > I wonder if it'd be useful to have a 'delivered count' on the packet > itself. > > What is the specific use both of you get from knowing if a packet has been > delivered though? > > I've not needed it myself, since if it's delivered, the protocol > continues, and if it's not delivered, well, > reliable delivery will eventually either deliver it or the remote party > will disconnect, so I don't have > to pay attention to this. > > > I have a toy chat application where I can send data to several recipients. > I use it to log the fact that all recipients did receive the text I sent. > Nothing critical. > > > > > Benoit: > > I don't see ENet setting the packet freeCallback anywhere. I believe it's > unrelated to the malloc/free. > > > Yes you are right, I didn't check the code. Well then it means I can > change my binding to use this instead of maintaining a list of packets for > acknowledgment notification. (this packet callback didn't exist when I > implemented this feature). > > > -- > Benoit. > > _______________________________________________ > 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 > >
_______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
