views:

371

answers:

4

I want to do socket programming in C. Where client and server are exchanging messages. I have the sample codes with me, but i wanted some elaborate links and tutorials for socket programming C, so that i can write effective and error free code. I will be working with WinSock library and not on Linux. Any help?

+6  A: 

I think the standard response to this question is:

http://beej.us/guide/bgnet/

Andrew Top
a quick question, is the guide applicable to WinSock as well? is the WinSock api similar to sys/socket.h?
Anirudh Goel
Yes, it is applicable to Winsock as well. Winsock is based off of BSD sockets, which is what the guide covers. In Beej's guide, read "1.5. Note for Windows Programmers".
Andrew Top
+1  A: 

Install Windows® Server 2003 R2 Platform SDK Full Download this have samples a lot.

lsalamon
+3  A: 

If found this book - Effective TCP/IP Programming

(some older edition though) to be quite enlightening some time in the past.

And the all time book "UNIX Network Programming" by W. Richard Stevens is a great source to learn from and understand how it all works.

User
+2  A: 

See basic samples, Complete Client Code and Complete Server Code. All part of the original, and necessary, Winsock Reference .

gimel
thanks and i've been there already, needed some thing more to it, so i asked.
Anirudh Goel