mDevelopmentLog[3] = Networking

Hello Turtles,

This blog post is a week delayed, and I apologize for that. Essentially during the week was spent being ordered by Monky Bird and Sara Cat to revamp the old networking code I’ve had laying around since 2009 and before, and bring it up to TurtleBrains standards, or at least start the process of doing so. Bringing up to standards was mostly a tedious task, handling errors differently, and ratcheting up the quality by using more modern techniques and other ‘rules’ that I’ve learned to apply to my code through-out the years.

The public facing interface is far from complete, or even much use in a real-world scenario. So for this reason all work done on the networking layer will remain in the unstable area of the TurtleBrains framework until more thought and effort is applied.

I started with basic request/response for HTTP/HTTPS protocols, using libcurl (and thus openssl or other) for help with the SSL/TLS layer. This appears to be working, at least I can pull json files from my server as desired, though I still need to learn how to serve them more dynamically!

For lower-level socket connections UDP was tested, on Windows only, in a basic manner having clients ‘connect’ to a server and send packets of their cars location and controls. There is a complete trust for the client that data is correct, but for this simple test that isn’t a problem. In a real world game that would be a BIG problem.

Until next week, have a good one!

Comments are closed.