Simple GUI Server & Networking Class (C++ / SDL_Net)

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Post Reply
Veylon
Posts: 7
Joined: Wed Nov 15, 2006 7:21 pm

Simple GUI Server & Networking Class (C++ / SDL_Net)

Post by Veylon »

Image
This is a simple wrapper class that I made to encapsulate all that SDL_net server stuff (from the tutorials) and make it easy to use. Since you can't see that, I made a simple GUI to show it.



I'll expand on this and make it easier to send other kinds of data than text, but right now the main features are:

- It's simple.
- You don't have to update it manually, it runs itself, including various log-ins and chat.

I should also note that I, personally, don't understand networking all that well (which is at least part of the reason for me making this), so most of this code comes directly from the SDL_Net tutorials, with only the wrapping, multithreading, and semi-conversion to C++ STL being mine.

I also plan to make it use wide characters like Irrlicht (to avoid painful conversions) and to use overloadable classes (also like irrlicht) so that the server/client can have event receivers and such (making things more flexible). I don't plan to work on more on GUI, because apparently someone else has already done this far better than I could.

Try it out and let me know what you think. Feel free to edit.

http://www.geocities.com/veylon_ii/IrrServer.zip

PS: If you're wondering about "Points", I was just trying out some server-side stuff where the server would keep tabs on the players.
Post Reply