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 and writing code. For you, we present this (very short) list of suggestions.
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?) I recommend Windows Sockets Network Programming by Bob Quinn and Dave Shute, ISBN 0-201-63372-8. 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.
Step 3: Read the Quick and Dirty Primer. Jim Frost has a quick Winsock tutorial that shows you how to write a basic client and server as console mode programs that use blocking sockets. He also shows a basic GUI program that uses asynchronous sockets. Beware that the code only compiles under Win32.
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 sockets.com. Aside from this FAQ (wink, wink), Bob Quinn's sockets.com 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 comp.os.ms-windows.programmer.tools.winsock, 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 DejaNews. Another great resource for those really tough questions is the Winsock 2 mailing list put "subscribe winsock-2" in the message body to subscribe. You can search the Winsock-2 mailing list online at Stardust's web site.
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!
Back to the Winsock Programmer's FAQ...
![]() |
Go to my home page |
![]() |
Go to my Important RFC Lists page |
![]() |
Go to the main Programming Resources page |
Please send updates and corrections to <tangent@cyberport.com>.