Winsock for the Impatient

by Warren Young

You know who you are. The one who never reads manuals. The one who used to read ahead in math class. The one who learns APIs by reading code. You want to get up to speed quickly on Winsock. Here’s the fast-track info you need to know.

Step 1: Get a good Winsock book. Yes, I know, you don’t read books, you read code. Trust me, however, Winsock is not a simple API. (If it was simple, we wouldn’t need a FAQ, now would we?) There is a section in the FAQ with several book reviews. While you’re waiting [impatiently] for your book to arrive (you don’t still shop off-line, do you?), continue with this list.

Step 2: Download the spec. You shouldn’t need it often, but the spec is more complete than the online docs, and it’s full-text searchable and printable. (If you have the MSDN Library, you already have this, though it’s buried in the library.)

Step 3: Check out the basic examples in the FAQ. The Examples section of the FAQ has a section with several basic Winsock programs with a bit of discussion on each. You may also find Jim Frost’s quick Winsock tutorial useful.

Step 4: Read the Lame List. This list will give you an idea of what is acceptable behavior for a Winsock program and what is not.

Step 5: Bookmark Aside from this FAQ (wink, wink), Bob Quinn’s site is the best source of deep info on Winsock. In particular, the sections on Winsock 2 are more authoritative than the spec–if the spec says one thing and Bob says another, believe Bob.

Step 6: Tap into the info streams. The two main Winsock newsgroups — alt.winsock.programming and — are great places to get answers to your Winsock questions. Plus, chances are good that someone’s already asked the question you are interested in, so you can find the question’s answer in the online news archives at Google Groups. Another great resource for those really tough questions is the Winsock 2 mailing list. There are mailing list archives there going back to Fall 1996.

Step 7: Write code. Lots of it. The only way to learn something is to do it, and Winsock has lots of odd and surprising behaviors for you to discover.

That’s it! Happy Winsocking!

<< Articles
Which I/O Strategy Should I Use? >>
Updated Fri Dec 16 2022 12:23 MST   Go to my home page