[ENet-discuss] Cannot connect to 127.0.0.1

Lee Salzman lsalzman1 at cox.net
Wed Apr 4 12:56:12 PDT 2007


Make sure you continue to service both hosts, even after connection, or 
otherwise the connection handshake will fail to complete.

Lee

Assaf Muller wrote:
> Hey guys!
>  
> Here's what I'm attempting to do: I'm creating a new game with 
> networking capabilities and I've chosen Enet for the net API. I'm 
> currently implementing the very basics, connecting, disconnecting, etc.
> To test it I'm opening one client that listens on 127.0.0.1 
> <http://127.0.0.1> with port 50,000, and another client (simply a 2nd 
> window) that listens on 127.0.0.1 <http://127.0.0.1> and port 50,001. 
> The problem is that when the 2nd window
> tries to connect to the 1st one, I receive no CONNECTED event for the 
> 2nd window. I use the tutorial code pretty much 1:1...
>  
> 
> if
> 
> (enet_host_service (mHost, &event, 5000) > 0 && event.type == 
> ENET_EVENT_TYPE_CONNECT)
> 
> {
> 
> Ogre::LogManager::getSingleton().logMessage("Connected to the IP 
> specified!");
> 
> }
> 
> else
> 
> {
> 
> /* Either the 5 seconds are up or a disconnect event was */
> 
> /* received. Reset the peer in the event the 5 seconds */
> 
> /* had run out without any significant event. */
> 
> enet_peer_reset (peer);
> 
> Ogre::LogManager::getSingleton().logMessage("Could not connect to the IP 
> specified!");
> 
> }
> 
> Any ideas?
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss



More information about the ENet-discuss mailing list