It’s been a long hard road with the networking engine, and I’m absolutely no where near the end… but I have successfully pinged my server from my client!
Proof, because pictures make everything better, click it to see the animation.
There are loads of problems still, and a lot of those are simply because I haven’t even coded some of the bits that are needed to make things work correctly. I’m very happy to see a client-server round trip working, and it gives me a lot of hope that this version of the network code will actually be the one I use without having to start over again.
Here is a list of some of the things I know don’t work correctly yet:
- When a client disconnects from the server, there seem to be some weirdness around the server accepting new connections afterwards. (Not sure if different ways of disconnecting cause different issues.)
- When multiple clients are connected to the server, there is no way for the server to accurately identify which one is which, so things that are expected to return to the client that sent them (like a ping) actually end up going to the client that connected first. (This one is easy, the clients don’t yet have the ability to register themselves and get their “source ID” from the server. That means they all use the same hard coded ID.)
- When the server sends a message that is intended as a broadcast, it is not actually broadcasted to all connected clients. (I think this is the same problem as the one above, but I listed it separately because I am not positive yet.)
- There is no way yet to do directed messages from either the client or the server. (There isn’t a way for clients to request the list of valid target IDs and their associated names yet.)
This list probably isn’t complete, but it does represent some of the more obvious things that still need to be added to the network engine. Please don’t take this as negative, I’m thrilled to have successfully gotten a round trip ping to work, and I’m very happy that the list above no longer includes things like “make the network engine work at all.” I call this a total victory with a little bit of a TODO list. :D