[ENet-discuss] sorry for the post...

Eduardo Del Balso e_delbalso at hotmail.com
Fri Mar 25 09:25:51 PST 2005


Thanks for the reply! My apologies, I had added that to test something out 
and forgot to remove it before copy/pasting.

I know I'm connecting 'cause my client receives the connection event in 
reply to a connection attempt to the server. It's the server that never 
generates it, but I debugged it and it does receive the input command and 
send out the reply, it's just the code never sets event.type to 
ENET_CONNECTED (or whatever it is..).

So just replace that line in the code with NE_SERVER_PORT;


>From: Atani <atani at atani-software.net>
>Reply-To: atani at atani-software.net,        Discussion of the ENet library 
><enet-discuss at cubik.org>
>To: Discussion of the ENet library <enet-discuss at cubik.org>
>Subject: Re: [ENet-discuss] sorry for the post...
>Date: Fri, 25 Mar 2005 08:23:29 -0800
>
>
>A very cursory glance at the code and I think this is your problem...
>
>Basically, you are creating your server on port 1235 and the client is
>connecting to NE_SERVER_PORT (1234).
>
>I may be a bit off here, but I think that may be the source of your 
>problems..
>
>On Thursday 24 March 2005 10:31 pm, Eduardo Del Balso wrote:
> > here is my NetworkEngine.h
> >
> > #define NE_SERVER_PORT 1234;
> >
> > ****************************
> >
> > here is my NetworkEngine.cpp
> >  if( type == NE_SERVER )
> >  {
> >   cout << "Creating Server...\n";
> >   ENetAddress address;
> >
> >   cout << "Setting host to " << (int)ENET_HOST_ANY;
> >
> >   address.host = ENET_HOST_ANY;
> >   address.port = 1235;
> >
> > NEError CNetworkEngine::connect( char * add )
> > {
> >  if( m_type != NE_CLIENT )
> >  {
> >   cout << "Cannot connect if not client...\n";
> >   return NE_ERROR;
> >  }
> >
> >  ENetAddress address;
> >     ENetEvent event;
> >
> >  enet_address_set_host( & address, "127.0.0.1" );
> >  address.port = NE_SERVER_PORT;
>_______________________________________________
>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