<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt"><div><span><br></span></div><div>That is what I thought ENet should be doing, but my case is quite simple that there is no connection drop (therefore, peer pointer address can be different). The packet sent and received occurs within less that 0.1 second, so again, disconnection is out of question. I have solved (probably workaround) by deriving ip address from both peer pointers.. and now they are same..!</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" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Doug Warren <dwarren@thebigwave.net><br> <b><span style="font-weight: bold;">To:</span></b> Syed Setia Pernama <syedhs@yahoo.com>;
 Discussion of the ENet library <enet-discuss@cubik.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, March 29, 2013 11:23 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [ENet-discuss] ENetPeer pointer comparison..<br> </font> </div> <br>
<div id="yiv375270913"><div dir="ltr">Start of enet_host_create():<div><div>    host -> peers = (ENetPeer *) enet_malloc (peerCount * sizeof (ENetPeer));</div></div><div><br></div><div style="">The list of peers is created at the time the host is created and is reused same with channels, buffers, and some uses of commands.</div>

</div><div class="yiv375270913gmail_extra"><br><br><div class="yiv375270913gmail_quote">On Fri, Mar 29, 2013 at 7:43 AM, Syed Setia Pernama <span dir="ltr"><<a rel="nofollow" ymailto="mailto:syedhs@yahoo.com" target="_blank" href="mailto:syedhs@yahoo.com">syedhs@yahoo.com</a>></span> wrote:<br>

<blockquote class="yiv375270913gmail_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;"><div>Hi,</div><div><br></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">

I am 80% sure nothing wrong is with my code. Here I copy+paste the log:-</div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;"><br></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">

22:12:48: Pinging peer (pointer=29411384, ip = 10.1.1.10)<br>22:12:48: Pinging peer (pointer=29411764, ip = 10.1.1.30)<br>22:12:48: ID_GENERAL_PING  (pointer=29412144)<br></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">

<br></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">What happened is I ping (using my own structure) two peers which has ENetPeer pointer address = 29411384 & 29411764. And then the peer is supposed to reply back, and I compare the ENetPeer</div>

<div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">stored in ENetEvent, and they are not the same! 29412144 is not the same with both (29411384 & 29411764). What I was hoping is the ENetPeer stored in ENetEvent should equal to either one,</div>

<div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">and therefore my code works.</div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">

<br></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">Question:</div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">

Can anyone confirm that ENet indeed create a new copy of ENetPeer (not reusing it) for the above case?</div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">

<br></div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">TIA.</div><div style="font-style:normal;font-size:13.3333px;background-color:transparent;font-family:verdana, helvetica, sans-serif;">

<br></div></div></div><br>_______________________________________________<br>
ENet-discuss mailing list<br>
<a rel="nofollow" ymailto="mailto:ENet-discuss@cubik.org" target="_blank" href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br>
http://lists.cubik.org/mailman/listinfo/enet-discuss<br>
<br></blockquote></div><br></div>
</div><br><br> </div> </div>  </div></body></html>