<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="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 29, 2013 at 7:43 AM, 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"><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 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>