This is the Winsock Programmer's FAQ. See
the Introduction section for history, a list
of mirrors, and information about the maintainer.
This FAQ answers the most commonly-asked questions on the
alt.winsock.programming and comp.os.ms-windows.programmer.tools.winsock
newsgroups. The FAQ also contains a growing repository of
Winsock programming information and links useful for all levels of
programmers. Please email me
if you have any corrections or additions for the list.
If you would like to view this FAQ off-line, you can
download a ZIPped version (321 KB, last packaged
2000.08.13) of these pages.
What's New?
2000.08.13
Added info about WinPCap to the packet capturing FAQ item.
(WinPCap is a free library used for writing packet sniffers.)
2000.08.12
Merged three items in the General section
that talked about Winsock versions
and where to get Winsock. They really were just several parts of the
same question.
Updated the "When
is the next revision of the Winsock spec due out?" item to note that
Winsock is slowly evolving, though no new specs are coming out.
2000.08.10
Fixed a potential bug in the error
message lookup function in the basic example programs' common ws_util.cpp
module. (STL's lower_bound() doesn't always return "one past the
end" when it fails to find what you asked for.)
Added a pair of items on peeking and out-of-band (OOB) data. These are
related because they're both enabled by optional flags to recv()
and send() .
Alun Jones sent me a whole spate of small additions,
and clarifications pointing out the places where what I meant to say and
what the FAQ actually says were at odds. Several real technical problems
were corrected, too.
2000.07.04
There is an implementation of the
Unix poll() function for
Winsock. Added info about it to the BSD compatibility article.
There were two places mentioning the RPC method of
getting the machine's MAC address. Microsoft has broken this feature in
at least one patch for Windows 95 and in Windows 2000. Since the feature
wasn't all that reliable anyway, these references have been replaced
with warnings not to use the feature. I could have just removed the
references, but the feature is well-known and often recommended because
it's so simple. It's the FAQ's place to stand up and say, "This is the
wrong answer for this question."
2000.07.03
Added an asynchronous I/O client program to
the Basic Winsock Examples section.
Added an asynchronous I/O client based on CAsyncSocket instead of calling
the Winsock async API directly. These two examples are useful in and
of themselves, but they're also interesting to compare to each other to
see how the MFC wrapper helps (and hinders!) over the plain API.
As a result of writing those two programs, I updated
the CSocket Considered Harmful
article.
Some kind readers pointed out that there is in fact
an SSL mechanism built into Windows NT 4.0 SP4+ and Windows 2000. The
SSL FAQ item has been updated to
reflect this.
2000.06.29
Updated the item on getting the machine's MAC address.
It was becoming quite inaccurate.
Added an item discussing how to get SSL encryption for your
programs.
2000.06.28
Added an item discussing
the various reasons why NT Server is the only legitimate server platform for high
loads.
Updated the connection backlog item a bit: added
info on the backlog limitations in various MS OSes, and discussed why
and when this matters.
Added two new items on UDP: "What is UDP? What are its
limitations?", and "What is
UDP good for?".
Split the links to related FAQs out of the Web Pages
resource section into their own section.
2000.06.27
Added an item regarding the proper
value for a server's connection
backlog.
2000.06.20
Fixed the description of the Nagle algorithm. I blame
the store that sold me all that Jolt. They should never let me buy such
things. :)
Previous "What's New"
Entries...
Contents
Section 0 - Introduction
Section 1 - General Winsock Information
Section 2 - Issues for New Winsock Programmers
Section 3 - Intermediate Winsock Issues
Section 4 - Advanced Winsock Issues
Section 5 - Resources
Section 6 - Examples
Section 7 - Articles
Section 8 - Book and Software Reviews
Section 9 - Glossary
|