12 - Network Programming With Windows Socket
12 - Network Programming With Windows Socket
Windows Socket
• Named pipes and mailslots are suitable for interprocess
communication between processes on the same computer
or processes on Windows computers connected by a local
or wide area network.
• Named pipes and mailslots (both simply referred to here as
“named pipes” unless the distinction is important) have the
distinct drawback, however, of not being an industry
standard.
• The resulting system can operate over TCP/IP-based wide
area networks, and the server, for instance, can accept
requests from UNIX, Linux, and other non-Windows clients.
• Windows provides interoperability by
supporting Windows Sockets, which are nearly
the same as, and interoperable with, Berkeley
Sockets, a de facto industry standard.
• This chapter shows how to use the Windows
Sockets (or “Winsock”) API by modifying
Chapter 11’s client/server system.
Winsock
• Winsock, by enabling standards-based
interoperability, allows programmers to
exploit higher-level protocols and applications,
such as ftp, http, RPCs, and COM, all of which
provide different, and higher-level, models for
standard, interoperable, networked
interprocess communication.
• Winsock, because of conformance to industry
standards, has naming conventions and
programming characteristics somewhat different
from the Windows functions described so far. The
Winsock API is not strictly a part of the Windows API.
• Winsock also provides additional functions that are
not part of the standard; these functions are used
only as absolutely required. Among other
advantages, programs will be more portable to other
operating systems.
Socket Server Functions