<div>The problem was actually that I was creating both host and peer with:</div>
<div> </div>
<div>
<p>mHost = enet_host_create (& 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> <<a href="mailto:enet-discuss-request@cubik.org">enet-discuss-request@cubik.org
</a>> 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> <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> <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 'help' to
<br> <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> <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 "Re: Contents of ENet-discuss digest..."<br><br><br>Today's Topics:<br><br> 1. Re: 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 <<a href="mailto:lsalzman1@cox.net">
lsalzman1@cox.net</a>><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 <<a href="mailto:enet-discuss@cubik.org">enet-discuss@cubik.org</a>
><br>Message-ID: <<a href="mailto:461402DC.8010904@cox.net">461402DC.8010904@cox.net</a>><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>> Hey guys!<br>><br>> Here's what I'm attempting to do: I'm creating a new game with<br>> networking capabilities and I've chosen Enet for the net API. I'm
<br>> currently implementing the very basics, connecting, disconnecting, etc.<br>> To test it I'm opening one client that listens on <a href="http://127.0.0.1">127.0.0.1</a><br>> <<a href="http://127.0.0.1">
http://127.0.0.1</a>> with port 50,000, and another client (simply a 2nd<br>> window) that listens on <a href="http://127.0.0.1">127.0.0.1</a> <<a href="http://127.0.0.1">http://127.0.0.1</a>> and port 50,001.
<br>> The problem is that when the 2nd window<br>> tries to connect to the 1st one, I receive no CONNECTED event for the<br>> 2nd window. I use the tutorial code pretty much 1:1...<br>><br>><br>> if<br>>
<br>> (enet_host_service (mHost, &event, 5000) > 0 && event.type ==<br>> ENET_EVENT_TYPE_CONNECT)<br>><br>> {<br>><br>> Ogre::LogManager::getSingleton().logMessage("Connected to the IP
<br>> specified!");<br>><br>> }<br>><br>> else<br>><br>> {<br>><br>> /* Either the 5 seconds are up or a disconnect event was */<br>><br>> /* received. Reset the peer in the event the 5 seconds */
<br>><br>> /* had run out without any significant event. */<br>><br>> enet_peer_reset (peer);<br>><br>> Ogre::LogManager::getSingleton().logMessage("Could not connect to the IP<br>> specified!");
<br>><br>> }<br>><br>> Any ideas?<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><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>