Winsock Programmer's FAQ
Section 5.7: MS Knowledge Base Articles

Not all Winsock behaviors are documented in the spec. Here's a list of interesting things I've found in Microsoft's Knowledge Base.


Q120642, "TCP/IP & NBT Configuration Parameters for Windows NT" - This article documents all the registry tunables that the Windows NT/2000 TCP/IP stack uses, such as the MTU size. There is a similar article, Q158474, for Windows 95/98.

Q190351, "Spawn Console Processes with Redirected Standard Handles" - It's possible to redirect the standard I/O handles (stdin, stdout, stderr) to a socket, by way of the CreateProcess() API. (Note that per Q150523, discussed below, this does not work on Windows 95/98.)

Q131978, "Receive/Send Multicasts Under WinNT/Win95 Using WinSock" - The title says it all.

Interesting Features

Q142641, "Internet Server Unavailable Because of Malicious SYN Attacks" - This article was written in 1996 in response to the first SYN flood attacks. It describes a new feature Microsoft added to its Windows NT service packs called "dynamic backlog". This feature changes how the listen() backlog parameter works. (See this FAQ item for more on connection backlogs.)

Q187709, "Windows NT 4.0 Domain Name Resolver Caches Responses Regardless of Registry Setting" - Windows NT 4.0's name resolver caches all name lookups for a small amount of time. It will only cache a certain number of names, though, so (with a few caveats) you can set the cache size to zero to disable this cache, forcing Winsock to ask the nearest name server on every gethostbyname() request. (That name server will do its own caching, of course.)

Q199947, "Windows NT 4.0 Does Not Support TCP Scale Option" - Windows NT does not support the TCP window scale option (RFC 1323), limiting its TCP window size to 64 KB. (I'm told that Windows 2000 does support the window scale option.)

Q193059, "IP Helper APIs Add Net Config and Stat Info to Win32 Apps" - This article discusses the IP Helper APIs in newer versions of Windows. These aren't strictly Winsock, but they make many Winsock tasks easier, and some previously-impossible ones easy.

Q164249, "Autodial Heuristics" - This article explains how Windows NT chooses when to bring up a RAS link with its autodial feature.

Q150523, "Socket Inheritance on Different Windows Platforms" - Sockets duplicated with Winsock 2's WSADuplicateSocket() function behave differently between Windows 9x and Windows NT/2000. A related article is Q156319.


Q177346, "select() Fails to Block on a Blocking Socket" - The title pretty much says it all. If you use select() on Windows 95/98, read this article.

Q177074, "Starting and Stopping a Winsock Server Using SO_REUSEADDR" - This documents a problem with restarting a server using the SO_REUSEADDR option to avoid the TIME_WAIT TCP date.

Q186245, "FD_WRITE Reposted After Every Send" - Windows NT 4.0 up through SP3 behaved out-of-spec with regard to FD_WRITE notifications. This behavior would allow programs to be more sloppily written than the Winsock spec demands and yet still work. The stack was changed to obey the spec in SP4 and Windows 2000.

Q192599, "Avoid Data Peeking in Winsock" - This article explains why using "peeks" will almost certainly not be helpful for your program. (This isn't a bug in Winsock so much as a mismatch between how you'd expect this feature to work and how it actually does work.)

<< Other FAQs Winsock SDKs and Specifications >>
Last modified on 19 October 2001 at 15:56 UTC-7 Please send corrections to
< Go to the main FAQ page << Go to the Home Page