<div> </div>
<div>Can you please elaborate on what you mean by "servicing" the server again? I'm having the same problem. I'm going off the tutorial, but I never get any events on the server other than disconnect. This is my client connection code:
</div>
<div> </div>
<div><font size="2">
<p>ENetEvent event;</p>
<p></p>
<p></p></font><font color="#008000" size="2">/* Connect to <a href="http://some.server.net:1234">some.server.net:1234</a>. */</font><font size="2">
<p>ENetAddress address = { ENET_HOST_ANY, WH_SERVER_PORT };</p>
<p>enet_address_set_host (& address, "localhost"); </p></font><font color="#008000" size="2">//ip_address);</font><font size="2">
<p>client = enet_host_create(NULL, 1, 0, 0);</p>
<p></p>
<p></p></font><font color="#008000" size="2">/* Initiate the connection, allocating the two channels 0 and 1. */</font><font size="2">
<p>peer = enet_host_connect (client, & address, 2); </p>
<p></p></font><font color="#0000ff" size="2">if</font><font size="2"> (peer == NULL)
<p>{</p>
<p></p></font><font color="#0000ff" size="2">return</font><font size="2"> </font><font color="#0000ff" size="2">false</font><font size="2">;
<p>}</p>
<p></p></font><font color="#008000" size="2">/* Wait up to 5 seconds for the connection attempt to succeed. */</font><font size="2">
<p></p></font><font color="#0000ff" size="2">if</font><font size="2"> (enet_host_service (client, & event, 5000) > 0 &&
<p>event.type == ENET_EVENT_TYPE_CONNECT)</p>
<p>{</p>
<p></p></font><font color="#0000ff" size="2">return</font><font size="2"> </font><font color="#0000ff" size="2">true</font><font size="2">;
<p>}</p>
<p></p></font><font color="#0000ff" size="2">else</font><font size="2">
<p>{</p>
<p></p></font><font color="#008000" size="2">/* Either the 5 seconds are up or a disconnect event was */</font><font size="2">
<p></p></font><font color="#008000" size="2">/* received. Reset the peer in the event the 5 seconds */</font><font size="2">
<p></p></font><font color="#008000" size="2">/* had run out without any significant event. */</font><font size="2">
<p>enet_peer_reset (peer);</p>
<p></p></font><font color="#0000ff" size="2">return</font><font size="2"> </font><font color="#0000ff" size="2">false</font><font size="2">;
<p></p></font><font color="#008000" size="2">//puts ("Connection to <a href="http://some.server.net:1234">some.server.net:1234</a> failed.");</font><font size="2">
<p>}</p>
<p> </p>
<p>Am I not making a function call? Thanks for your help.</p>
<p> </p>
<p>Chris Long</p></font></div>