<div>The problem was actually that I was creating both host and peer with:</div>
<div>&nbsp;</div>
<div>
<p>mHost = enet_host_create (&amp; mAddress<font color="#008000">, </font>2, 0, 0);</p>
<p>while (it would seem so, and this took me 2 days of work to find out!)</p>
<p>that the peer side can only be created with:<br><br>mHost = enet_host_create (0<font color="#008000">, </font>2, 0, 0);</p>
<p>Or the connection will never work. Ever. This should be mentioned in the tutorial!</p></div>
<div><span class="gmail_quote">On 4/5/07, <b class="gmail_sendername"><a href="mailto:enet-discuss-request@cubik.org">enet-discuss-request@cubik.org</a></b> &lt;<a href="mailto:enet-discuss-request@cubik.org">enet-discuss-request@cubik.org
</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Send ENet-discuss mailing list submissions to<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:enet-discuss@cubik.org">enet-discuss@cubik.org
</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://lists.cubik.org/mailman/listinfo/enet-discuss">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br>or, via email, send a message with subject or body &#39;help&#39; to
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:enet-discuss-request@cubik.org">enet-discuss-request@cubik.org</a><br><br>You can reach the person managing the list at<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:enet-discuss-owner@cubik.org">enet-discuss-owner@cubik.org
</a><br><br>When replying, please edit your Subject line so it is more specific<br>than &quot;Re: Contents of ENet-discuss digest...&quot;<br><br><br>Today&#39;s Topics:<br><br>&nbsp;&nbsp;1. Re:&nbsp;&nbsp;Cannot connect to <a href="http://127.0.0.1">
127.0.0.1</a> (Lee Salzman)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Wed, 04 Apr 2007 12:56:12 -0700<br>From: Lee Salzman &lt;<a href="mailto:lsalzman1@cox.net">
lsalzman1@cox.net</a>&gt;<br>Subject: Re: [ENet-discuss] Cannot connect to <a href="http://127.0.0.1">127.0.0.1</a><br>To: Discussion of the ENet library &lt;<a href="mailto:enet-discuss@cubik.org">enet-discuss@cubik.org</a>
&gt;<br>Message-ID: &lt;<a href="mailto:461402DC.8010904@cox.net">461402DC.8010904@cox.net</a>&gt;<br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Make sure you continue to service both hosts, even after connection, or
<br>otherwise the connection handshake will fail to complete.<br><br>Lee<br><br>Assaf Muller wrote:<br>&gt; Hey guys!<br>&gt;<br>&gt; Here&#39;s what I&#39;m attempting to do: I&#39;m creating a new game with<br>&gt; networking capabilities and I&#39;ve chosen Enet for the net API. I&#39;m
<br>&gt; currently implementing the very basics, connecting, disconnecting, etc.<br>&gt; To test it I&#39;m opening one client that listens on <a href="http://127.0.0.1">127.0.0.1</a><br>&gt; &lt;<a href="http://127.0.0.1">
http://127.0.0.1</a>&gt; with port 50,000, and another client (simply a 2nd<br>&gt; window) that listens on <a href="http://127.0.0.1">127.0.0.1</a> &lt;<a href="http://127.0.0.1">http://127.0.0.1</a>&gt; and port 50,001.
<br>&gt; The problem is that when the 2nd window<br>&gt; tries to connect to the 1st one, I receive no CONNECTED event for the<br>&gt; 2nd window. I use the tutorial code pretty much 1:1...<br>&gt;<br>&gt;<br>&gt; if<br>&gt;
<br>&gt; (enet_host_service (mHost, &amp;event, 5000) &gt; 0 &amp;&amp; event.type ==<br>&gt; ENET_EVENT_TYPE_CONNECT)<br>&gt;<br>&gt; {<br>&gt;<br>&gt; Ogre::LogManager::getSingleton().logMessage(&quot;Connected to the IP
<br>&gt; specified!&quot;);<br>&gt;<br>&gt; }<br>&gt;<br>&gt; else<br>&gt;<br>&gt; {<br>&gt;<br>&gt; /* Either the 5 seconds are up or a disconnect event was */<br>&gt;<br>&gt; /* received. Reset the peer in the event the 5 seconds */
<br>&gt;<br>&gt; /* had run out without any significant event. */<br>&gt;<br>&gt; enet_peer_reset (peer);<br>&gt;<br>&gt; Ogre::LogManager::getSingleton().logMessage(&quot;Could not connect to the IP<br>&gt; specified!&quot;);
<br>&gt;<br>&gt; }<br>&gt;<br>&gt; Any ideas?<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; ENet-discuss mailing list
<br>&gt; <a href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</a><br>&gt; <a href="http://lists.cubik.org/mailman/listinfo/enet-discuss">http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br><br><br><br>------------------------------
<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">
http://lists.cubik.org/mailman/listinfo/enet-discuss</a><br><br><br>End of ENet-discuss Digest, Vol 47, Issue 2<br>*******************************************<br></blockquote></div><br>