[ENet-discuss] Receiving problem, the client doesn't receive packets

Mika Halttunen lsoft at mbnet.fi
Tue May 25 07:04:12 PDT 2004


Greetings!
I've been trying to implement a simple test game with Enet, but I have 
problems getting the basic stuff working.

So far I've implemented a server which accepts players like this:
1. start server
2. client connects, send him a welcome message
3. client receives the welcome and sends his data to the server
4. server gets the data and sends the data about other players to the
    new client.
5. client receives the data and set's up the local copies of the other
    players.

The problem is with 4 and 5: the client never receives the data server 
sent. I debugged and the server indeed sends them without any errors, 
but the client never receives anything after the welcome packet, that 
is: handle_client_packet() in my code gets never called.

I'm using a new ENet cvs snapshot (in fact just updated it today).

I have attached my networking code in a ZIP, could somebody take a quick 
look and tell me if there's anything wrong there. I can send the whole 
sources (it requires Allegro for gfx and input) if needed.

The code attached is the networking part, in the game code I'm setting 
up the server/client, entering the main loop and calling 
handle_network_events() regularly.

Thanks!

-- 
Mika Halttunen
lsoft at mbnet.fi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: network.cpp.zip
Type: application/octet-stream
Size: 3685 bytes
Desc: not available
Url : http://lists.puremagic.com/pipermail/enet-discuss/attachments/20040525/4c73c524/network.cpp.obj


More information about the ENet-discuss mailing list