<s>
In	O
computing	O
,	O
the	O
Windows	B-Application
Sockets	I-Application
API	I-Application
(	O
WSA	O
)	O
,	O
later	O
shortened	O
to	O
Winsock	B-Application
,	O
is	O
an	O
application	B-Application
programming	I-Application
interface	I-Application
(	O
API	B-Application
)	O
that	O
defines	O
how	O
Windows	B-Application
network	O
application	B-Application
software	I-Application
should	O
access	O
network	O
services	O
,	O
especially	O
TCP/IP	B-Protocol
.	O
</s>
<s>
It	O
defines	O
a	O
standard	O
interface	O
between	O
a	O
Windows	B-Application
TCP/IP	B-Protocol
client	O
application	B-Application
(	O
such	O
as	O
an	O
FTP	B-Protocol
client	I-Protocol
or	O
a	O
web	B-Application
browser	I-Application
)	O
and	O
the	O
underlying	O
TCP/IP	B-Protocol
protocol	I-Protocol
stack	I-Protocol
.	O
</s>
<s>
The	O
nomenclature	O
is	O
based	O
on	O
the	O
Berkeley	B-Protocol
sockets	I-Protocol
API	B-Application
used	O
in	O
BSD	B-Operating_System
for	O
communications	O
between	O
programs	O
.	O
</s>
<s>
Early	O
Microsoft	O
operating	O
systems	O
,	O
both	O
MS-DOS	O
and	O
Microsoft	B-Application
Windows	I-Application
,	O
offered	O
limited	O
networking	O
capability	O
,	O
chiefly	O
based	O
on	O
NetBIOS	B-Protocol
.	O
</s>
<s>
In	O
particular	O
,	O
Microsoft	O
did	O
not	O
offer	O
support	O
for	O
the	O
TCP/IP	B-Protocol
protocol	I-Protocol
stack	I-Protocol
at	O
that	O
time	O
.	O
</s>
<s>
A	O
number	O
of	O
university	O
groups	O
and	O
commercial	O
vendors	O
,	O
including	O
the	O
PC/IP	O
group	O
at	O
MIT	O
,	O
FTP	B-Protocol
Software	O
,	O
Sun	O
Microsystems	O
,	O
Ungermann-Bass	O
,	O
and	O
Excelan	O
,	O
introduced	O
TCP/IP	B-Protocol
products	O
for	O
MS-DOS	O
,	O
often	O
as	O
part	O
of	O
a	O
hardware/software	O
bundle	O
.	O
</s>
<s>
When	O
Windows	B-Application
2.0	I-Application
was	O
released	O
,	O
these	O
vendors	O
were	O
joined	O
by	O
others	O
such	O
as	O
Distinct	O
and	O
NetManage	O
in	O
offering	O
TCP/IP	B-Protocol
for	O
Windows	B-Application
.	O
</s>
<s>
The	O
drawback	O
faced	O
by	O
all	O
of	O
these	O
vendors	O
was	O
that	O
each	O
of	O
them	O
used	O
their	O
own	O
API	B-Application
(	O
Application	B-Application
Programming	I-Application
Interface	I-Application
)	O
.	O
</s>
<s>
Without	O
a	O
single	O
standard	O
programming	O
model	O
,	O
it	O
was	O
difficult	O
to	O
persuade	O
independent	O
software	O
developers	O
to	O
create	O
networking	O
applications	O
which	O
would	O
work	O
with	O
any	O
vendor	O
's	O
underlying	O
TCP/IP	B-Protocol
implementation	O
.	O
</s>
<s>
The	O
Windows	B-Application
Sockets	I-Application
project	O
had	O
its	O
origins	O
in	O
a	O
Birds	O
Of	O
A	O
Feather	O
session	O
held	O
at	O
Interop	O
'	O
91	O
in	O
San	O
Jose	O
on	O
October	O
10	O
,	O
1991	O
.	O
</s>
<s>
At	O
the	O
time	O
the	O
NetManage	O
socket	O
was	O
the	O
only	O
100%	O
DLL	O
based	O
,	O
multi-threaded	O
product	O
for	O
Windows	B-Application
3.0	I-Application
available	O
.	O
</s>
<s>
All	O
the	O
participating	O
developers	O
resisted	O
the	O
shortening	O
of	O
the	O
name	O
to	O
simple	O
Winsock	B-Application
for	O
a	O
long	O
time	O
,	O
since	O
there	O
was	O
much	O
confusion	O
among	O
users	O
between	O
the	O
API	B-Application
and	O
the	O
DLL	O
library	O
file	O
(	O
winsock.dll	O
)	O
which	O
only	O
exposed	O
the	O
common	O
WSA	O
interfaces	O
to	O
applications	O
above	O
it	O
.	O
</s>
<s>
Users	O
would	O
commonly	O
believe	O
that	O
only	O
making	O
sure	O
the	O
DLL	O
file	O
was	O
present	O
on	O
a	O
system	O
would	O
provide	O
full	O
TCP/IP	B-Protocol
protocol	I-Protocol
support	O
.	O
</s>
<s>
The	O
Windows	B-Application
Sockets	I-Application
API	I-Application
specification	O
defines	O
two	O
interfaces	O
:	O
the	O
API	B-Application
used	O
by	O
application	B-Application
developers	O
,	O
and	O
the	O
SPI	B-Application
,	O
which	O
provides	O
a	O
means	O
for	O
network	O
software	O
developers	O
to	O
add	O
new	O
protocol	O
modules	O
to	O
the	O
system	O
.	O
</s>
<s>
The	O
API	B-Application
guarantees	O
that	O
a	O
conforming	O
application	B-Application
will	O
function	O
correctly	O
with	O
a	O
conforming	O
protocol	O
implementation	O
from	O
any	O
network	O
software	O
vendor	O
.	O
</s>
<s>
The	O
SPI	B-Application
contract	O
guarantees	O
that	O
a	O
conforming	O
protocol	O
module	O
may	O
be	O
added	O
to	O
Windows	B-Application
and	O
will	O
thereby	O
be	O
usable	O
by	O
an	O
API-compliant	O
application	B-Application
.	O
</s>
<s>
Although	O
these	O
contracts	O
were	O
important	O
when	O
Windows	B-Application
Sockets	I-Application
was	O
first	O
released	O
,	O
since	O
network	O
environments	O
required	O
multi-protocol	O
support	O
(	O
see	O
above	O
)	O
they	O
are	O
now	O
of	O
only	O
academic	O
interest	O
.	O
</s>
<s>
Included	O
in	O
the	O
Windows	B-Application
Sockets	I-Application
API	I-Application
version	O
2.0	O
are	O
functions	O
to	O
use	O
IPX/SPX	B-Protocol
,	O
although	O
the	O
protocol	O
was	O
all	O
but	O
obsolete	O
already	O
at	O
the	O
time	O
WSA	O
2.0	O
shipped	O
.	O
</s>
<s>
Microsoft	O
has	O
shipped	O
the	O
TCP/IP	B-Protocol
protocol	I-Protocol
stack	I-Protocol
with	O
all	O
recent	O
versions	O
of	O
Windows	B-Application
,	O
and	O
there	O
are	O
no	O
significant	O
independent	O
alternatives	O
.	O
</s>
<s>
Nor	O
has	O
there	O
been	O
significant	O
interest	O
in	O
implementing	O
protocols	O
other	O
than	O
TCP/IP	B-Protocol
.	O
</s>
<s>
Windows	B-Application
Sockets	I-Application
code	O
and	O
design	O
are	O
based	O
on	O
BSD	B-Protocol
sockets	I-Protocol
,	O
but	O
provides	O
additional	O
functionality	O
to	O
allow	O
the	O
API	B-Application
to	O
comply	O
with	O
the	O
regular	O
Windows	B-Application
programming	O
model	O
.	O
</s>
<s>
The	O
Windows	B-Application
Sockets	I-Application
API	I-Application
covered	O
almost	O
all	O
the	O
features	O
of	O
the	O
BSD	B-Protocol
sockets	I-Protocol
API	I-Protocol
,	O
but	O
there	O
were	O
some	O
unavoidable	O
obstacles	O
which	O
mostly	O
arose	O
out	O
of	O
fundamental	O
differences	O
between	O
Windows	B-Application
and	O
Unix	B-Application
(	O
though	O
Windows	B-Application
Sockets	I-Application
differed	O
less	O
from	O
BSD	B-Protocol
sockets	I-Protocol
than	O
the	O
latter	O
did	O
from	O
STREAMS	B-Operating_System
)	O
.	O
</s>
<s>
All	O
function	O
calls	O
in	O
the	O
API	B-Application
begin	O
with	O
the	O
moniker	O
,	O
e.g.	O
</s>
<s>
However	O
it	O
was	O
a	O
design	O
goal	O
of	O
Windows	B-Application
Sockets	I-Application
that	O
it	O
should	O
be	O
relatively	O
easy	O
for	O
developers	O
to	O
port	O
socket-based	O
applications	O
from	O
Unix	B-Application
to	O
Windows	B-Application
.	O
</s>
<s>
It	O
was	O
not	O
considered	O
sufficient	O
to	O
create	O
an	O
API	B-Application
which	O
was	O
only	O
useful	O
for	O
newly	O
written	O
Windows	B-Application
programs	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
Windows	B-Application
Sockets	I-Application
included	O
a	O
number	O
of	O
elements	O
which	O
were	O
designed	O
to	O
facilitate	O
porting	O
.	O
</s>
<s>
For	O
example	O
,	O
Unix	B-Application
applications	O
were	O
able	O
to	O
use	O
the	O
same	O
variable	O
to	O
record	O
both	O
networking	O
errors	O
and	O
errors	O
detected	O
within	O
standard	B-Language
C	I-Language
library	I-Language
functions	O
.	O
</s>
<s>
Since	O
this	O
was	O
not	O
possible	O
in	O
Windows	B-Application
,	O
Windows	B-Application
Sockets	I-Application
introduced	O
a	O
dedicated	O
function	O
,	O
,	O
to	O
retrieve	O
error	O
information	O
.	O
</s>
<s>
Such	O
mechanisms	O
were	O
helpful	O
,	O
but	O
application	B-Application
porting	O
remained	O
extremely	O
complex	O
.	O
</s>
<s>
Many	O
original	O
TCP/IP	B-Protocol
applications	O
had	O
been	O
implemented	O
by	O
using	O
system	O
features	O
specific	O
to	O
Unix	B-Application
,	O
such	O
as	O
pseudo	B-Protocol
terminals	I-Protocol
and	O
the	O
fork	B-Language
system	I-Language
call	I-Language
,	O
and	O
reproducing	O
such	O
functionality	O
in	O
Windows	B-Application
was	O
problematic	O
.	O
</s>
<s>
Within	O
a	O
relatively	O
short	O
time	O
,	O
porting	O
gave	O
way	O
to	O
the	O
development	O
of	O
dedicated	O
Windows	B-Application
applications	I-Application
.	O
</s>
<s>
Version	O
1.0	O
(	O
June	O
1992	O
)	O
defined	O
the	O
basic	O
operation	O
of	O
Winsock	B-Application
.	O
</s>
<s>
It	O
was	O
kept	O
very	O
close	O
to	O
the	O
existing	O
interface	O
of	O
Berkeley	B-Protocol
sockets	I-Protocol
to	O
simplify	O
porting	O
of	O
existing	O
applications	O
.	O
</s>
<s>
A	O
few	O
Windows-specific	O
extensions	O
were	O
added	O
,	O
mainly	O
for	O
asynchronous	O
operations	O
with	O
message-based	O
notifications	O
.	O
</s>
<s>
Although	O
the	O
document	O
did	O
n't	O
limit	O
support	O
to	O
TCP/IP	B-Protocol
,	O
TCP	O
and	O
UDP	O
were	O
the	O
only	O
protocols	O
explicitly	O
mentioned	O
.	O
</s>
<s>
Most	O
vendors	O
only	O
delivered	O
TCP/IP	B-Protocol
support	O
,	O
although	O
Winsock	B-Application
from	O
DEC	O
included	O
DECNet	B-Protocol
support	O
as	O
well	O
.	O
</s>
<s>
Winsock	B-Application
2	I-Application
was	O
a	O
backwards-compatible	B-General_Concept
extension	O
of	O
Winsock	B-Application
1.1	O
.	O
</s>
<s>
It	O
added	O
support	O
for	O
protocol-independent	O
name	O
resolution	O
,	O
asynchronous	O
operations	O
with	O
event-based	O
notifications	O
and	O
completion	O
routines	O
,	O
layered	B-Protocol
protocol	I-Protocol
implementations	O
,	O
multicasting	O
,	O
and	O
quality	O
of	O
service	O
.	O
</s>
<s>
It	O
also	O
formalized	O
support	O
for	O
multiple	O
protocols	O
,	O
including	O
IPX/SPX	B-Protocol
and	O
DECnet	B-Protocol
.	O
</s>
<s>
Although	O
the	O
new	O
specification	O
differed	O
substantially	O
from	O
Winsock	B-Application
1	O
,	O
it	O
provided	O
source	O
-	O
and	O
binary-level	O
compatibility	O
with	O
the	O
Winsock	B-Application
1.1	O
API	B-Application
.	O
</s>
<s>
One	O
of	O
the	O
lesser	O
known	O
additions	O
was	O
the	O
Service	B-Application
Provider	I-Application
Interface	I-Application
(	O
SPI	B-Application
)	O
API	B-Application
and	O
Layered	B-Library
Service	I-Library
Providers	I-Library
.	O
</s>
<s>
Version	O
2.1.0	O
(	O
January	O
1996	O
)	O
was	O
the	O
first	O
public	O
release	O
of	O
the	O
Winsock	B-Application
2	I-Application
specification	O
.	O
</s>
<s>
It	O
was	O
also	O
the	O
first	O
version	O
to	O
remove	O
support	O
for	O
16-bit	O
Windows	B-Application
applications	I-Application
.	O
</s>
<s>
The	O
IPv6	B-Protocol
Technical	O
Preview	O
for	O
Windows	B-Application
2000	I-Application
(	O
December	O
2000	O
)	O
saw	O
the	O
first	O
implementation	O
of	O
RFC	O
2553	O
(	O
March	O
1999	O
,	O
later	O
obsoleted	O
by	O
RFC	O
3493	O
)	O
,	O
a	O
protocol-independent	O
API	B-Application
for	O
name	O
resolution	O
,	O
which	O
would	O
become	O
part	O
of	O
Winsock	B-Application
in	O
Windows	B-Application
XP	I-Application
.	O
</s>
<s>
Windows	B-Application
8	I-Application
includes	O
the	O
"	O
RIO	O
"	O
(	O
Registered	O
IO	O
)	O
extensions	O
for	O
Winsock	B-Application
.	O
</s>
<s>
These	O
extensions	O
are	O
designed	O
to	O
reduce	O
the	O
overhead	O
of	O
the	O
user	O
to	O
kernel	O
mode	O
transition	O
for	O
the	O
network	O
data	O
path	O
and	O
the	O
notification	O
path	O
,	O
but	O
use	O
the	O
rest	O
of	O
the	O
regular	O
Windows	B-Application
TCP	O
and	O
UDP	O
stack	O
(	O
and	O
uses	O
existing	O
network	O
cards	O
)	O
.	O
</s>
<s>
The	O
setup	O
path	O
(	O
for	O
example	O
,	O
the	O
"	O
connect	O
"	O
function	O
)	O
is	O
unchanged	O
from	O
the	O
regular	O
Winsock	B-Application
path	O
.	O
</s>
<s>
Microsoft	O
did	O
not	O
supply	O
an	O
implementation	O
of	O
Winsock	B-Application
1.0	O
.	O
</s>
<s>
Version	O
1.1	O
of	O
Winsock	B-Application
was	O
supplied	O
in	O
an	O
add-on	O
package	O
(	O
called	O
Wolverine	O
)	O
for	O
Windows	B-Application
for	O
Workgroups	O
(	O
code	O
named	O
Snowball	O
)	O
.	O
</s>
<s>
It	O
was	O
an	O
integral	O
component	O
of	O
Windows	B-Application
95	I-Application
and	O
Windows	B-Device
NT	I-Device
from	O
versions	O
3.5	O
and	O
onwards	O
(	O
the	O
initial	O
commercially	O
available	O
version	O
of	O
Windows	B-Device
NT	I-Device
,	O
version	O
3.1	O
,	O
included	O
only	O
a	O
proprietary	O
and	O
quite	O
incomplete	O
implementation	O
of	O
TCP/IP	B-Protocol
based	O
on	O
the	O
AT&T	O
UNIX	B-Application
System	I-Application
V	O
"	O
STREAMS	B-Operating_System
"	O
API	B-Application
)	O
.	O
</s>
<s>
Version	O
2.1	O
of	O
Winsock	B-Application
was	O
supplied	O
in	O
an	O
add-on	O
package	O
for	O
Windows	B-Application
95	I-Application
.	O
</s>
<s>
It	O
was	O
an	O
integral	O
component	O
of	O
Windows	B-Device
98	I-Device
,	O
Windows	B-Device
NT	I-Device
4.0	I-Device
,	O
and	O
all	O
subsequent	O
Windows	B-Application
releases	O
.	O
</s>
<s>
(	O
Microsoft	O
did	O
not	O
supply	O
implementations	O
of	O
Winsock	B-Application
2	I-Application
for	O
Windows	B-Application
3.x	O
or	O
Windows	B-Device
NT	I-Device
3.x	O
.	O
)	O
</s>
<s>
Recent	O
versions	O
of	O
Winsock	O
2.x	O
have	O
been	O
delivered	O
with	O
new	O
Windows	B-Application
releases	O
or	O
as	O
part	O
of	O
service	O
packs	O
.	O
</s>
<s>
Winsock	B-Application
2	I-Application
is	O
extensible	O
by	O
a	O
mechanism	O
known	O
as	O
a	O
Layered	B-Library
Service	I-Library
Provider	I-Library
(	O
LSP	O
)	O
.	O
</s>
<s>
Winsock	B-Library
LSPs	I-Library
are	O
available	O
for	O
a	O
wide	O
range	O
of	O
useful	O
purposes	O
,	O
including	O
Internet	O
parental	O
controls	O
,	O
web	O
content	O
filtering	O
,	O
QoS	O
etc	O
.	O
</s>
<s>
The	O
layering	O
order	O
of	O
all	O
providers	O
is	O
kept	O
in	O
the	O
Winsock	B-Application
Catalog	O
.	O
</s>
<s>
In	O
previous	O
versions	O
of	O
Windows	B-Application
,	O
removing	O
a	O
buggy	O
LSP	O
could	O
result	O
in	O
corruption	O
of	O
the	O
Winsock	B-Application
catalog	O
in	O
the	O
registry	O
,	O
potentially	O
resulting	O
in	O
a	O
loss	O
of	O
all	O
network	O
connectivity	O
.	O
</s>
<s>
Winsock	B-Application
in	O
Windows	B-Application
XP	I-Application
Service	O
Pack	O
2	O
,	O
Windows	B-Application
Server	O
2003	O
Service	O
Pack	O
1	O
and	O
all	O
later	O
Windows	B-Application
operating	I-Application
systems	I-Application
has	O
the	O
ability	O
to	O
self-heal	O
after	O
a	O
user	O
uninstalls	O
such	O
an	O
LSP	O
.	O
</s>
<s>
Among	O
the	O
other	O
vendors	O
offering	O
Winsock-compliant	O
TCP/IP	B-Protocol
and	O
UDP/IP	O
stacks	O
were	O
(	O
alphabetically	O
)	O
3Com	O
,	O
Beame	O
&	O
Whiteside	O
,	O
DEC	O
,	O
Distinct	O
,	O
FTP	B-Protocol
Software	O
,	O
Frontier	O
,	O
IBM	O
,	O
Microdyne	O
,	O
NetManage	O
,	O
Novell	O
,	O
Sun	O
Microsystems	O
and	O
Trumpet	O
Software	O
International	O
.	O
</s>
<s>
Trumpet	B-Protocol
Winsock	I-Protocol
by	O
Peter	B-Protocol
Tattam	I-Protocol
was	O
one	O
of	O
the	O
few	O
Winsock	B-Application
1.0	O
implementations	O
that	O
could	O
be	O
installed	O
under	O
Windows	B-Application
3.0	I-Application
,	O
which	O
had	O
no	O
built-in	O
support	O
for	O
Winsock	B-Application
.	O
</s>
<s>
Trumpet	O
was	O
also	O
the	O
most	O
popular	O
shareware	B-License
implementation	O
of	O
Winsock	B-Application
for	O
Windows	B-Application
3.x	O
.	O
</s>
<s>
Trumpet	B-Protocol
Winsock	I-Protocol
5.0	O
is	O
available	O
for	O
Windows	O
95/98	O
and	O
Windows	B-Device
NT	I-Device
and	O
includes	O
a	O
Winsock	B-Application
1.1	O
compliant	O
IPv6	B-Protocol
stack	O
for	O
these	O
operating	O
systems	O
.	O
</s>
<s>
The	O
Wine	B-Application
project	I-Application
contains	O
a	O
source	O
and	O
binary	O
compatible	O
reimplementation	O
of	O
Winsock	B-Application
on	O
top	O
of	O
the	O
BSD	B-Protocol
sockets	I-Protocol
API	I-Protocol
.	O
</s>
