Advertisement

ENet client problem

Started by February 16, 2015 05:54 PM
10 comments, last by coquinounet 9 years, 9 months ago

Hello,

i'm making a game with SFML and ENet for network, i've made a game server and after some seconds, the client stops receiving packets from the server but he still sending packets. I don't know if you already had this problems but if you have some hints, i thinks it's maybe because i send to much packets but it's not sure.

Thanks for reading

What does Wireshark say on the client? On the server? Does each of them actually receive the packets from the other? Does each of them send packets back?
enum Bool { True, False, FileNotFound };
Advertisement

The server sends packets, client don't receive them but he stills sending packets and server receives them

The server sends packets, client don't receive them


Where are they dropped, then?
enum Bool { True, False, FileNotFound };

When the client should receive them, but how and why, i don't know but it's on only one channel, that's weird

When the client should receive them, but how and why, i don't know but it's on only one channel, that's weird


So the outer-layer packets are making it back into the client. That's great!
Now, you can set breakpoints in the code where the packets are received, and trace through the code, to see where the packet is mis-routed.
That will tell you what happened to make it stop working.
enum Bool { True, False, FileNotFound };
Advertisement

Well when i use enet_host_service, there is no event for receiving so I can't find why I donc receive them and I can't debug it

Well when i use enet_host_service, there is no event for receiving so I can't find why I donc receive them and I can't debug it


Build enet from source, and put a breakpoint in the call to recv() that actually receives packets. Then follow that packet through the library to see where it goes.
enum Bool { True, False, FileNotFound };

Well there is a lot of packet loss, but why, I don't know

What is the physical networking setup? Is client and server running on the same machine, different machines on the same physical network, or different networks? What is the network?
How often are you sending packets?
Are you properly managing the memory buffers for the packets? Have you tried running your program with a debugging memory allocator?
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement