Sockets and How to Learn Them

Warning! Some information on this page is older than 3 years now. I keep it for reference, but it probably doesn't reflect my current knowledge and beliefs.

19:19
Wed
14
Oct 2009

Sockets and How to Learn Them

Everyone who wants to code transferring data across a network has to learn the concept and API of sockets, no matter if he works in Windows or Linux. I currently work with them again. The most popular tutorial to start with sockets is AFAIK Beej's Guide to Network Programming (and here is my mirror of the Polish translation: [html], [pdf]). I've recently came across another great document: Winsock Programmer's FAQ. I generally like FAQ-s as a good way to start learning about new topic and this one contains many valuable advices. I especially like the article Which I/O Strategy Should I Use? beacuse it explains what ways are available to do asynchronous I/O with sockets under Windows.

Each time I use sockets, I ask myself whether it has to be so much complicated, with all these states, errors, structures, flags etc. I'm afraid it always has to be this way as I've seen many implementations of wrappers and all looked very similar or almost the same as the original. The only way to simplify this API is to limit its functionality or to take it to the higher level of abstraction, like RPC. I believe writing network code is so hard because:

Comments (0) | Tags: networking | Author: Adam Sawicki | Share

Comments

(No comments)

Post comment

Nick *
Your name or nickname
E-mail
Your contact information (optional, will not be shown)
Text *
Content of your comment
Calculate *
(* - required field)
STAT NO AD [Stat] [Admin] [STAT NO AD] [pub] [Mirror] Copyright © 2004-2017 Adam Sawicki
Copyright © 2004-2017 Adam Sawicki