Well, a stupid simple way of doing this cleanly if you don't mind hacking the code a bit:<div><br></div><div>Take a look into enet_protocol_remove_sent_reliable_command(). If you check near the bottom there is a bit that looks like:</div>
<div><br></div><div>if (outgoingCommand -> packet != NULL)</div><div>{</div><div>...</div><div>}</div><div><br></div><div>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.<br>
<br><div class="gmail_quote">On Fri, May 25, 2012 at 5:32 AM, Thorbjørn Lindeijer <span dir="ltr"><<a href="mailto:bjorn@lindeijer.nl" target="_blank">bjorn@lindeijer.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Fri, May 25, 2012 at 2:26 PM, Lee Salzman <<a href="mailto:lsalzman@gmail.com">lsalzman@gmail.com</a>> wrote:<br>
> ENET_EVENT_TYPE_RECEIVE. Don't be silly, man. :)<br>
<br>
</div>That is "a packet has been received from a peer", while I'm sure<br>
Emmanuel was asking about a way of knowing whether a sent packet has<br>
arrived at the target peer. :)<br>
<br>
- Bjørn<br>
<div class="HOEnZb"><div class="h5"><br>
> On Fri, May 25, 2012 at 12:36 AM, Emmanuel Rivoire <<a href="mailto:manu.n02@laposte.net">manu.n02@laposte.net</a>><br>
> wrote:<br>
>><br>
>> Hello,<br>
>><br>
>> is there an easy way to know if a reliable packet has been delivered ?<br>
>><br>
>> Checking the current value of<br>
>> ENetPeer::channels[PacketChannel].outgoingReliableSequenceNumber just after<br>
>> have called enet_host_service() , and then waiting to get that value (or<br>
>> above) in ENetPeer::channels[PacketChannel].incomingReliableSequenceNumber<br>
>> would be enough to do the trick ?<br>
>><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<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>
_______________________________________________<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>
</div></div></blockquote></div><br></div>