views:

72

answers:

4

Hi,

I am a new developer of C++ and i want to do socket programming in c++ or VC++.net. If you have good and easy to learn tutorial for socket programming in c/c++ please share the link.

+2  A: 

From Microsoft themselves, you can use winsock and read their guide: http://msdn.microsoft.com/en-us/library/ms738545(VS.85).aspx

You can also use boost.asio which uses the more cross-platform Boost library. http://www.boost.org/doc/libs/1_44_0/doc/html/boost_asio.html

I learned a lot at the beginning reading Beej's Guide

birryree
+1. Beej's guide looks significantly upgraded since I read it 8-9 years ago :) (at least, I think that was the site...)
Merlyn Morgan-Graham
A: 

Here are some tutorials for you which I had referred to recently: http://shoe.bocks.com/net/

for more u can even refer to a book by Richard Stevens on Networked Game Prigramming.

Mark Taylor
A few more links:http://beej.us/guide/bgnet/http://www.linuxhowtos.org/C_C++/socket.htm
Mark Taylor
A: 

edit: oops -- this is if you're interested in Unix, if you only want Windows, ignore the rest of this answer.

Try Unix Network Programming. You'll learn A LOT, and I do mean A LOT. After you've done sockets in C and learned protocols form that book, you'll understand working with them in any language, in any platform.

Santiago Lezica
A: 

Check out the Free Framework for an introduction to high-performance Windows socket code. I find this a bit easier to follow than the Boost.ASIO code, probably because it's single-platform.

Steve Townsend