Register
Email: Password:
Forum » Networking(C/++)

Networking(C/++)

NeoGangster 15 years ago
So I started to learn networking in C/C++ on windows
I got this guide for sockets.
I wonder if there is a good, cross-platfrom library or class which handels sockets.

Right now I got a server/client app.
I'm working on making it possible that multiple clients can connect to it and send data.
Right now it's a chat app with only one user.

So the next step will be multithreading in C++ and windows.
Anyone got a good tutorial on this?

If this goes as planned, then this will evolve into a game.
Maybe just a small game like tic tac toe online first to get used to it.
I don't think I will do any fast paced action games, maybe a multiplayer casual puzzle game. Well that will be decided after I learned doing networking right ^^

I can upload source+app, when I get the multiple clients done, if anybody is interessted.
#
Amarth 15 years ago
A few years ago RakNet was the de facto C++ networking lib. Free for small games use if you give credit. Not sure if there are other libraries around though I'd say take a look, perhaps ask on gamedev.net or something.

Multithreading, I have never done it in C++. I think Pthreads aren't really well supported on Windows, so you'll perhaps want to take a look at Boost.Thread or something. There's a bit of theory behind multithreading though (things like locks, deadlock/starvation prevention, critical sections, ...) and I'm not sure where you would pick it up. Of course, you can just jump in and see where you end up, depending on your application you might not run into any problems anywhere.

I've never really got the hang of writing a multiplayer game. Though I usually just want to write action games and I get lost in all sorts of lag prevention stuff, probably not getting my priorities straight but well...
#
NeoGangster 15 years ago
yeah I once stumbled on raknet but it's overkill. I don't want a library with 1 billion functions, while I only want to use 2.
I'll look into Boost.Thread.
#
ville 15 years ago
I used to use RakNet some time ago, when the original Cormoon engine was supposed to have multiplayer. I think it had cross-platform support for the basic socket operations, but it does contain a lot of extra you don't need.
#
Forum » Networking(C/++)

Post Reply


Your email:
Your name: