Windows Sockets Network Programming, 1st edition

  • Bob Quinn
  • David Shute

Unfortunately, this item is not available in your country.


Windows Sockets (WinSock), a standard network API co-developed by PC network industry leaders including Microsoft, Novell, Hewlett-Packard, and FTP Software, is an extraordinary resource for Windows network programmers. This book will enable you to reap WinSock's full benefits to create client and server network applications for use on any TCP/IP network, including the Internet. It also lays the groundwork for WinSock application development using other protocol suites.

The book describes how to develop 16- and 32-bit WinSock applications, and focuses on designs that will run on any WinSock implementation. It highlights the differences that exist between WinSock DLLs, and other traps and pitfalls in network application development, and shows you how to avoid them. It covers every function in version 1.1 of the WinSock specification, and provides a detailed tour of the newest features in WinSock version 2.

Windows Sockets Network Programming is geared for novice and experienced network programmers alike. The early chapters provide a tutorial that brings novices up to speed quickly, and the remainder provides a detailed reference, with examples. These include complete source code for a number of useful applications, including an ftp client. Other topics covered include: how to create a dynamic link library to run over WinSock, how to port existing BSD Sockets source code to WinSock, and how/when to use WinSock's optional features. It also details debugging techniques and tools.

The appendices provide a quick reference for API essentials, illustrations of the TCP/IP protocol suite, an extensive error reference, and pointers to more information on or off the Internet. The accompanying disk contains the source code for all the sample applications, as well as a few other tools to help you with your programming tasks.


Table of contents



1. Introduction to Windows Sockets.

What is Windows Sockets?

What is its History?

What Are its Benefits?

What is its Future?


2. Windows Sockets Concepts.

The OSI Network Model.

The WinSock Network Model.

OSI Layers in WinSock.

Modular Boxes.

Services and Protocols.

Protocols and APIs.

3. TCP/IP Protocol Services.

What is TCP/IP?

What is its History?

Transport Services.

Network Services.

Support Protocols and Services.

What is its Future?

4. Network Application Mechanics.

Client-Server Model.

Network Program Sketch.

Open a Socket.

Name the Socket.

Associate with Another Socket.

Send and Receive between Sockets.

Close the Socket.

Client and Server Sketches.

5. Operation Modes.

What Are Operation Modes?

Blocking Mode.

Nonblocking Mode.

Asynchronous Mode.

Performance Differences.

Platform Differences.

Blocking is Real.

6. Socket States.

What Are the Socket States?

What Are the Methods of Detection?

WSAAsyncSelect ().

Select ().

Peeking at Data.

Out-of-Band Data.

The Listening State.

7. Sample Application and Library.

Sample FTP Client.

Sample Library.


8. Host Names and Addresses.

Hostname and Address Resolution.

Host Table, DNS, and NIS.

Local Host Information.

Addresses and Formatting.

Protocol and Address Families.

9. Socket Information and Control.

Socket Control.

Socket Options.

Blocking Hooks.

Socket Names.

10. Support Routines.

Startup and Cleanup.

Byte Ordering.

Service Names and Ports.

Protocol Names and Numbers.

Error Reporting.

11. DLLs over WinSock.

Creating a New API.

DLL Issues.

Sample DLL.

12. Porting from BSD Sockets.

Differences to Consider.

Sixteen-bit Windows Considerations.


Functions List.

13. Debugging.

Problem Types.

What Failed, and How Did It Fail?

Problem Qualification.

Installation Debugging.

Network Debugging.

Application Debugging.

Debugging Tools.

14. Dos and Don'ts.

Characterizing Your Application.

Application Data Flow.

Stream Algorithms.

Datagram Algorithms.

Good-News Code.

Common Traps and Pitfalls.

15. Platforms.

The WOSA Network Model.

Thirty-two-bit WinSock.

Other Platforms.

16. Optional Features.

Optional Standard is an Oxymoron.

Should You Use Optional Features?

Raw Sockets.



Sharing Sockets.

Optional Options.

Sockets as File Handles.

Expect Any Error Anywhere.

Other Optional Features.

17. WinSock 2.

Do You Need WinSock 2?

Overview of Features.

Multiple Protocol Support.

Overlapped I/O.

Scatter and Gather.

Quality of Service.

Socket Groups.

Multipoint and Multicast.

Conditional Acceptance.

Connect and Disconnect Data.

Socket Sharing.

Protocol-Specific Additions.

Appendix A. TCP/IP Protocol Headers.

Layering within TCP/IP Packets.

ARP Header.

IP Header.

ICMP Header.

IGMP Header.

TCP Header.

UDP Header.

Sample Dialogs.

Appendix B. Quick Reference.




Appendix C. Error Reference.

Where to Get Error Values.

What Errors to Expect.

User-fixable Errors.

Detailed Error Descriptions.

Errors in Numerical Order.

Appendix D. What You Need.

Essential Files.

Compile and Link Mechanics.

Using Different WinSocks.

Using Different Languages.

Appendix E. Information Sources.

Internet Sources.


Index. 0201633728T04062001

Published by Addison-Wesley Professional (December 4th 1995) - Copyright © 1996