Winsock Programmer's FAQ: Revision History

Winsock Programmer's FAQ
Revision History

NOTE: After this point, all links into the FAQ are bogus, since the FAQ went through a major redesign here.


1999.09.25

Added some more info to the BSD Sockets Compatibility tutorial.

1999.08.30

Updated the ICMP Ping Example so that it compiles cleaner, and updated the commentary to note that the program still works on Microsoft's newest platforms (Win98 and Win2K) despite their past threats to remove the API.

Added some new info on the "how many sockets can you have open" problem discussed in Question 3.16. The new info discloses kernel internals that limit the number of sockets you can create on Windows NT 4.0 and Windows 2000. The item also includes some empirical data I've collected from Internet postings; some conclusions are drawn based on this data and the known kernel algorithms. I also added some info on increasing the low hard limit imposed under Win9x.

Improved the accuracy of the info on waitable timers in Question 2.14.

Added the Search function, courtesy of FreeFind.

Added Question 2.18, regarding the Winsock link library. (This question comes up with distressing frequency, so I broke down and added it to the FAQ. What is the world coming to? :-/)

1999.07.19

Updated the new "raw socket capabilities" table in item 3.1 with new information on what Windows 2000 will support.

1999.06.27

Fixed several broken links and added a number of new items to the Debugging page of the FAQ's Resources section.

Improved item 2.15, regarding the best way to send a broadcast packet.

Changed item 3.17. It used to say that only buggy Winsock stacks and LSPs limited the number of sockets per select() to 64, but I've been reliably informed that at least one respected Winsock vendor's stack behaves this way, and they aren't willing to change it. So, the FAQ item now recommends against trying to force your way past this limitation.

Improved item 3.18, to note that its advice won't help work around a certain Windows 9x bug, though it seems like it should help.

I just found out a way to get quasi-dup2() functionality under Winsock. Thus, the BSD Compatibility and Question 3.3 items have been updated.

Added item 3.21, to point people wanting to know about the control bits in a TCP packet to the Debugging TCP tutorial which covers this.

Added item 2.17, regarding advice for choosing server ports.

1999.04.12

Revamped Tutorial 4. I reworked the existing text, added some examples and went into more depth on some topics. More importantly, I changed the title from "Why Does Winsock Keep Corrupting My Data?" to "How to Use TCP Effectively". In the eight months that the tutorial has been online, I've come to realize that the original title was not quite accurate, so that many who should have read the tutorial were skipping over it because they didn't realize that it applied to problems they were having.

Updated Question 2.14 with information on aborting a wait on an event object by using a waitable timer.

Added Question 2.15, regarding broadcasting.

Split Question 2.8: the new Q2.8 deals with normal TCP disconnects. The rest of the information from the old Q2.8, having to do with abnormal network disconnects, is now in Question 2.16.

Reports indicate that my getifaces sample fails on Windows 95, so I've updated that page to reflect this.

1999.04.08

Tweaked some of the answers in Section 3 for accuracy.

1999.04.05

Item 3.14 basically said "you can't do that" to people wanting to do low-level network I/O. That's only true if you're just talking about the Winsock API. The current answer for that question breaks out of that box and provides pointers to other mechanisms for accessing the lower levels of the network stack.

I normally don't announce updates to the pages in the Resources section, because most often the changes merely reflect a site that has moved or something similarly trivial. This latest change is fairly significant, though: the Web Pages page now has links to a number of related FAQs.

1999.03.25

Small changes to this main page and also to the Mirrors section.

1999.03.21

Added item 0.6, which explains the FAQ's programming language bias and the reasons for it. Note that I moved the old item 0.6 (Acknowledgements) to 0.7. I did this because I prefer to keep the Acknowledgements section in its traditional place, at the end of the introductory material.

Simplified the answer to Question 0.5, which discusses the reasons I prefer not to answer Winsock questions by email.

Updated Question 1.6, mainly with more information on alternatives to Winsock for DOS programmers. Also added a paragraph to clear up the confusion between a DOS program and a console mode program which happens to run in a "DOS box" on Win32. (Many people, when they say they want to write a Winsock program that runs under DOS, really just want a console mode program.)

1999.03.17

(Saint Patrick's Day!) Updated Question 2.7 again, this time to clarify the language issues some more.

Revamped the answer to Question 3.9 again. I looked back over the previous update and was still unhappy with the way the item was phrased. So, I started working on it and ended up rewriting the whole item!

As a result of the previous change, I touched up Question 3.10, because it referred to the old Q3.9 language.

1999.03.12

Updated Question 2.7 to better cover the issues associated with programming Winsock in languages other than C or C++.

Clarified the answer to Question 3.9, regarding warnings about accessing a single socket from multiple threads.

Added information to Tutorial 4 on sending non-integer data across platforms.

1999.03.01

Fixed a bug in basic-client.cpp from Example 10. Thanks for the bug catch go to Jerome Jacobsen.

1999.02.23

Made a minor update to Question 2.10.

Added Question 2.14, having to do with timeouts and blocking Winsock functions.

1999.02.21

Updated the OS/2 entry in Question 1.6.

1999.02.16

Reworked Introduction page to be part of the main FAQ (Section 0).

1999.01.04

Added the basic-server example to Example 10.

1998.12.24

Added a few items to the BSD sockets compatibility tutorial.

1998.12.14

Fixed a problem with Question 2.8, and generally improved the answer to that question and to Question 2.12.

1998.11.24

Added the first "basic Winsock client" example program. More clients and also some server programs will follow in the series.

1998.11.22

Touched up several FAQ entries that refered to other people's copy of the Lame List to point to the version I just added.

1998.11.20

Added a copy of The Lame List to the Tutorials section. Must reading!

Several minor changes, especially to the newer items added on the sixth of this month.

1998.11.06

Added Tutorial 5, which introduces the reader to the black magic of low-level TCP debugging. In particular, it covers the netstat tool and the TCP/IP state/transition diagram -- how to read it, what to do when you get into problem states, how to diagnose the current state of the system, etc.

Reworked Question 2.9 a bit as a result of the new Tutorial. (It used to be called "How can I debug my Winsock program?", for example. Clearly inappropriate given the new material, and what the Question actually covered.)

Updated Question 2.8. The new Answer is more cosmopolitan in its advice, and it also addresses abnormal-disconnect issues, whereas the previous Answer only covered normal disconnects.

1998.10.26

Added Question 2.12, having to do with the proper way to close a socket.

Added Question 2.13, regarding MFC's CAsyncSocket and CSocket classes.

Added Question 3.18, regarding a method to bypass the routing layer on a machine with multiple network interfaces.

Added Question 3.19, which is about using SOCKS to drill through a firewall.

Added Question 3.20, regarding whether it is a good plan to call bind() in a client program.

Numerous other minor updates.

1998.09.27

Added support for changing the TTL value to the raw sockets ping program.

1998.09.19

Updated the much-neglected Section 1.

I just discovered that Question 2.12, which I added almost two months ago, is essentially identical to Question 2.2. You know your FAQ is getting big when.... Anyway, I nixed Question 2.12, and used its text in place of the less-well-written 2.2 text.

1998.09.07

Added Reviews section, and wrote the first five book reviews for it.

1998.08.23

Added Questions 3.16 and 3.17, regarding issues of "how many sockets can Winsock handle".

1998.08.01

Added Tutorial 3. This material largely supercedes Questions 3.4 and 3.7, so those items have also changed.

Turned Questions 2.12 and 2.13 into Tutorial 4.

Added a new Question 2.12, regarding how to speak various common protocols, like HTTP and FTP.

Added a new Question 3.4, regarding using the SNMP API for accessing the routing table, the ARP table, the interface list, etc. (It replaces the old Question 3.4, which was superceded by Tutorial 3.)

Updated several of the entries regarding Windows 98.

1998.07.31

Added two more network monitoring packages to the Debugging portion of the FAQ's Resources section.

Replaced Tutorial 2 with a new, completely-rewritten version.

1998.05.19 and 1998.05.20

Improved the wording of Question 3.15.

1998.04.28

Fixed a broken link.

1998.04.19

Updated Question 1.9 and also the Resources section.

1998.03.23

Added info on structure-padding issues to Question 2.13.

Updated Question 2.10 by removing the rumor that FormatMessage can return error messages for Winsock error numbers. I have since found out that at best this is undocumented behavior that only works on one or two of Microsoft's Winsock implementations. It is by no means a universal thing.

1998.03.22

Split Resources page up so that each sub-section has its own page.

Put the index pages for all the sections with their own directory in that directory. Now, the HTML file of the same name is just a redirector. For example, the old examples.html file is now at examples/index.html, and examples.html automatically forwards you to the new page.

Added a few new sniffers to the Debugging Resources subsection and updated most of the the existing entries.

1998.02.23

Added a bit of info to the Get Interface List example.

Added a bug note to the Get MAC Address (NetBIOS version) example.

1998.02.16

Added Questions 3.13 and 3.14, concerning raw sockets and such. Also updated Question 3.1 to reference the new questions for more information.

Added Question 3.15, concerning the time and place for turning off the Nagle algorithm.

Added a number of glossary entries.

1998.02.14

Added the "raw ping" example. Also touched up the answers to questions 3.1, 3.2, 3.8 and 1.7.

1998.02.02

Added a new tutorial, Winsock for the Impatient.

Updated the Glossary some, mainly the router, gateway and bridge entries and other related things.

1998.02.01

Updated Questions 1.3 and 1.8 with better Winsock 2 info.

Expanded Question 3.9 and split it up into Questions 3.9 through 3.11. Because they are all related, I didn't put the new questions at the end of the list, as I usually do. Instead, the old Question 3.10 is now Question 3.12.

Had one of those periodic whole-FAQ editing fits, and ended up re-working a lot of the text, partly for accuracy, partly to fill in missing detail, and partly just so that it reads better.

1998.01.31

Fixed a minor problem in Question 3.8.

Added Question 2.10, which explains how to get a readable error message from a Winsock error number.

Added Question 2.11, which sheds some light on the poorly-understood WSAEWOULDBLOCK error.

Added Question 2.12, which deals with the common misconceptions about how TCP "should" work versus how it actually does work.

Added Question 2.13, which talks about "network order" for integers.

Added Question 3.9, which deals with the behavior of asynchronous sockets in a multithreaded program.

Added Question 3.10, which explains how to tell if the modem is connected on systems with dial-up networking.

Added the "get interfaces" example.

1998.01.19

Added the Tutorials section. The first one is the information from the way-too-long answer to Question 2.4, in article format. The new answer to Question 2.4 mainly just summarizes the article and points readers to it for more information.

1998.01.17

Added Winsock debugging tools section to Resources page.

Added Question 2.9 to introduce the new debugging tools section.

1998.01.16

Updated the Introduction page significantly. If you haven't read through it recently, you may want to give it a quick skim, especially the "future directions" section and the short-and-unoriginal legal statement.

1998.01.12

Updated Question 2.7 to be correct some misconceptions present in earlier versions.

Expanded and reorganized the Resources section significantly.

Clarified and enhanced Question 1.6.

1998.01.04

Added the "get MAC address" examples (NetBIOS and RPC methods). Also added Question 3.8 to introduce those examples.

Enhanced Question 3.1, adding more details about the support for raw sockets on Microsoft and other Winsock implementations.

Split Question 2.4 into Questions 2.4a, 2.4b, and 2.4c. Each part is now greatly enhanced, resulting in a much broader and tolerant answer. [Obsolete -- see the note for 1998.01.19 for newer info].

1997.10.27

Added some info to Question 3.3. Also changed the wording to use Microsoft's preferred term "process" rather than "task."

1997.10.09

Added the Glossary

1997.10.07

Added this list.

Improved answer to Question 2.3, including a second method for getting the local IP address, and adding some caveats to the first method.

Refined answer to Question 2.4, making the distinction between non-blocking and blocking sockets. What was previously called non-blocking is now called "asynchronous". (This was not incorrect, just imprecise.) Also corrected some misconceptions about the behavior of blocking sockets.

1997.08.14

First announcement for the FAQ posted to Usenet.

Click here to return to the main FAQ page...

Last modified on 29 April 2000 at 15:52 UTC-7 Please send corrections to tangent@cyberport.com.
< Go to the main FAQ page
<< Go to my Programming pages
<<< Go to my Home Page