Starting network programming

I don't know anything about network programming but I want to try to modify my tic-tac-toe console program to be a multilayer game. Where do you recommend I start at for beginning network programming with c++? Thanks.
You need some library for that. Using winsock directly is a pain. Look into sflm ( http://www.sfml-dev.org/tutorials/1.6/network-sockets.php ). I think that might be a good place to begin.
I found Beej's guide to networking a good primer. It's easily found on the web and worth a read.
Is beej's guide for c or c++?
closed account (3hM2Nwbp)
After getting your feet wet with something like SFML, if you need more power, check out boost::asio.

www.boost.org/doc/libs/1_46_0/doc/html/boost_asio.html
closed account (S6k9GNh0)
Most networking APIs are based on the BSD sockets API (afaik) which is built on top of a C API. I personally have never used BSD sockets directly, I usually use them through some library such as ASIO, ACE's library, or even SFML sockets (which are rather simple). You'll want to familiarize yourself with how communication works, concepts on methods of networking, and then learn how to apply those with an API of your choice.

My weapon of choice is almost always ASIO. Asyncronous networking becomes almost standard when you familiarize yourself with it.
Last edited on
Topic archived. No new replies allowed.