Starting network programming

Jun 30, 2011 at 3:17am
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.
Jun 30, 2011 at 7:15am
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.
Jun 30, 2011 at 9:40am
I found Beej's guide to networking a good primer. It's easily found on the web and worth a read.
Jun 30, 2011 at 8:29pm
Is beej's guide for c or c++?
Jun 30, 2011 at 8:31pm
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
Jun 30, 2011 at 9:24pm
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 Jun 30, 2011 at 9:30pm
Topic archived. No new replies allowed.