<div dir="ltr">Yep, the freeCallback gets called when the ref count goes to zero. That's what it is for. :)</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 27, 2013 at 3:46 PM, Syed Setia Pernama <span dir="ltr"><<a href="mailto:syedhs@yahoo.com" target="_blank">syedhs@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:10pt;font-family:verdana,helvetica,sans-serif">Actually within ENet there is undocumented callback that get triggered when a reliable packet was succesfully received. Logically speaking,<br>
ENet must know the packet has been received properly, otherwise ENet will resend the packet (that is requirement for reliable packets).<br><div><span><br></span></div><div><br></div>  <div style="font-family:verdana,helvetica,sans-serif;font-size:10pt">
 <div style="font-family:times new roman,new york,times,serif;font-size:12pt"> <div dir="ltr"> <font face="Arial"> <hr size="1">  <b><span style="font-weight:bold">From:</span></b> Benoit Germain <<a href="mailto:bnt.germain@gmail.com" target="_blank">bnt.germain@gmail.com</a>><br>
 <b><span style="font-weight:bold">To:</span></b> Discussion of the ENet library <<a href="mailto:enet-discuss@cubik.org" target="_blank">enet-discuss@cubik.org</a>> <br> <b><span style="font-weight:bold">Sent:</span></b> Wednesday, February 27, 2013
 4:19 PM<br> <b><span style="font-weight:bold">Subject:</span></b> Re: [ENet-discuss] enet 1.3.6 dll for .net<br> </font> </div><div><div class="h5"> <br>
<div><br><br><div>2013/2/26 James Bellinger <span dir="ltr"><<a rel="nofollow" href="mailto:james@illusorystudios.com" target="_blank">james@illusorystudios.com</a>></span><br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


With either referenceCount or freeCallback, how are you differentiating disconnection from acknowledge?<br>
For example, enet_peer_disconnect (Peer.Disconnect) calls enet_peer_reset_queues.<br></blockquote><div><br>I don't. It happens that I haven't encountered a situation where I care though, so I didn't think about it :-). <br>


</div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
As a general thought:<br>
<br>
I wonder if it'd be useful to have a 'delivered count' on the packet itself.<br>
<br>
What is the specific use both of you get from knowing if a packet has been delivered though?<br></blockquote><div></div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


I've not needed it myself, since if it's delivered, the protocol continues, and if it's not delivered, well,<br>
reliable delivery will eventually either deliver it or the remote party will disconnect, so I don't have<br>
to pay attention to this.<br>
<br></blockquote><div><br>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.<br><br><br> </div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



Benoit:<br>
<br>
I don't see ENet setting the packet freeCallback anywhere. I believe it's unrelated to the malloc/free.<br></blockquote><div><br>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).<br>


 </div><br></div>-- <br>Benoit.<br>
</div><br></div></div><div class="im">_______________________________________________<br>ENet-discuss mailing list<br><a href="mailto:ENet-discuss@cubik.org" target="_blank">ENet-discuss@cubik.org</a><br><a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br><br> </div></div> </div>  </div></div><br>_______________________________________________<br>
ENet-discuss mailing list<br>
<a href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br>
<a href="http://lists.cubik.org/mailman/listinfo/enet-discuss" target="_blank">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>
<br></blockquote></div><br></div>