Networking Diagnosis with Wireshark

Networking Diagnosis with Wireshark

I’m still unfamiliar with ENet (I find it to be extremely limiting when compared to other networking libraries), so have yet to create a stable network connection with the server (the server receives the data but the client doesn’t seem to process any data sent from the server).

Yesterday I didn’t even get that far- the server wasn’t binding to the network interface although in code it was apparently doing so. How did I know that? A wire analyser.

A wire analyser is a tool that tells you what data is being sent over the network (wire), and is extremely useful for debugging network code. The wire analyser software that I use is Wireshark, though others exist such as Microsoft Message Analyser.

The Wireshark wire analyser tool

Above shows that the Flatline game client is sending data to the server (on port 29980), but the server isn’t binding to the network interface. I can get the same result if I run the client without the server being online (Port unreachable).

You can then diagnose your network code because you now know exactly what the problem is and roughly where the error lies (nothing on the other end so the problem probably lies in the code that binds to the network interface).


No Comments

Add your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.