Telecommunications Electronic Reviews (TER)

telecommunications electronic reviews

Volume 3, Issue 3, June, 1996

Telecommunications Electronic Reviews (TER) is a publication of the Library and Information Technology Association.

Telecommunications Electronic Reviews (ISSN: 1075-9972) is a periodical copyright © 1996 by the American Library Association. Documents in this issue, subject to copyright by the American Library Association or by the authors of the documents, may be reproduced for noncommercial, educational, or scientific purposes granted by Sections 107 and 108 of the Copyright Revision Act of 1976, provided that the copyright statement and source for that material are clearly acknowledged and that the material is reproduced without alteration. None of these documents may be reproduced or adapted for commercial distribution without the prior written permission of the designated copyright holder for the specific documents.


ter issues

   REVIEW OF: Dave Roberts. Developing for the Internet with Winsock. Scottsdale, AZ: The Coriolis Group, 1995.

REVIEW OF: Bob Quinn and Dave Shute. Windows Sockets Network Programming. Reading, MA: Addison-Wesley Publishing Company, 1996.

by Tony Toyofuku

Much of the credit for the rapid growth of the Internet can be traced to the World Wide Web and the ability it provides for the public to access the Web from their home computers. For many, the underlying networking application programming interface (API) that makes all of the network communication possible is the Windows Socket programming interface (Winsock).

A group of companies got together to create a "standard" library of routines that PC programmers could easily use to create portable programs that were not tied to one vendor's proprietary networking code; they based it largely on the pre-existing Berkeley Systems Design (BSD) UNIX "sockets" library. The resultant document, "Windows Sockets: An Open Interface for Network Programming under Microsoft Windows," provides the basis for a programming interface that does just that; the Winsock library shields applications developers from having to code low level network routines in assembly language, or from having to use only one vendor's network "stack". Instead of having to spend a lot of time concentrating on low level system and network calls, the programmer can concentrate on writing user applications, such as a Telnet program, an FTP client, or a Web browser.

Unfortunately, until relatively recently, there have been no books on how to write network applications using the Winsock library. Up until about a year ago, the best advice was: "Get the Winsock 1.1 specs, buy a copy of the Stevens book on UNIX network programming and look around the CICA FTP archives for Winsock source code." [ 1, 2, 3] While the Winsock "standard," the CICA archive, and "the Stevens book" are still good reference points, they are no longer the only places to look. Today, one interested in Winsock programming can actually select from a shelf full of books on the topic. Two such books are Developing for the Internet with Winsock, by Dave Roberts; and Bob Quinn and Dave Shute's Windows Sockets Network Programming.

These two books are aimed at Microsoft Windows programmers who are interested in writing applications programs for the Internet. The two books assume that the reader is familiar with programming using the Windows Standard Development Kit (SDK). Both books focus on writing 16 bit Windows 3.1 applications, but they do discuss writing for Microsoft's 32 bit operating systems, Windows 95 and Windows NT.

The first book, Developing for the Internet with Winsock, is divided into 14 chapters. After presenting an overview of the Internet, the OSI seven layer model, and other networking generalities in the first four chapters, Roberts gives an introduction to Winsock programming. In the fifth chapter, he covers both the basics of UNIX compatible function calls, such as listen(), and getprotobyname() and the message-based Windows specific calls, such as WSAStartup() and WSAAsyncSelect().

Chapter six begins the meat of the book; it is here that Roberts introduces his set of C++ classes that he has written to wrap the Winsock C functions. He creates classes for dealing with host table lookup databases, connecting and disconnecting to remote hosts, and sending and receiving stream data across a network. It is these C++ classes that form the foundation of the rest of the book.

With the exception of a small finger client and an FTP client, all of the rest of the book is devoted to building a POPMAIL client using his C++ classes. First he presents a basic POPMAIL client that can send and receive text messages, and then in ensuing chapters, he adds features such as ability to understand UUENCODING and MIME aware messages.

In these chapters, the author follows a standard format for presenting his information--first he covers the "Internet Request for Comment" (the de facto Internet "standard") for the specific protocol he is discussing (such as the POP protocol, UUENCODING/DECODING, and the MIME format). Then, he shows how to use his C++ classes with the given protocol and how to use the classes. Finally he presents voluminous amounts of source code to create a user application.

I admire the amount of source code that the author has written and presented; there are probably over 100 pages of original code. With minimal work, all of the source code compiled well under Microsoft Visual C++ 4.0, and I will certainly find myself pouring over his programs in the months to come. Unfortunately, Roberts discusses his C++ wrapper classes at the expense of the C function calls needed to implement any network operation. [ 4] The C++ classes are useful, but I would like to have seen more detail on using the Winsock API. As an example, there are only four pages (with large typeface) on the important function call WSAAsyncSelect(). What's more, most of the information the author includes on WSAAsyncSelect() can be found in the Winsock 1.1 specifications.

Where the first book focuses on using homegrown C++ classes, the second, Windows Sockets Network Programming, takes a more conventional look at the Winsock API. The authors stick to straight C code, and do not wrap any of the Winsock functions. After providing the requisite information on network basics in the first three chapters, in chapter four, the authors touch on basic socket operations, for both connection-oriented sockets, such as TCP (Transmission Control Protocol), and UDP (User Datagram Protocol) connectionless sockets.

Chapter five details the various modes for Windows Sockets, including blocking, non-blocking, and asynchronous modes. Chapter six builds on that by provided over 50 pages on socket states, including 14 pages detailing how to properly use WSAAsyncSelect(). This chapter also includes a liberal sprinkling of code samples to further drive home the complex ideas. The following chapter serves as the climax of the book; in this section the authors present a complete FTP client. In the process they do a very nice job of explaining exactly what is happening in each key section of code.

Chapter eight, "Host Names and Addresses" and chapter ten, "Support Routines," seem that they should more logically go toward the beginning of the book, as they discuss hostname resolution, starting up the Winsock DLL, and similar basic topics. Although the chapters are misplaced, they do provide valuable information.

The remainder of the book deals with miscellaneous topics, such as creating a new API over Winsock, porting existing UNIX code to Winsock, debugging tools for Winsock programmers, and "Dos and Don'ts." These chapters, although somewhat of a hodgepodge, are useful, especially chapter 14, "Dos and Don'ts," which points out common mistakes that one can make when using the Winsock API. The bibliography for Windows Sockets Network Programming is substantial, including among other things, books, Listservs, Web pages, and FTP sites.

I highly recommend this book for anyone interesting in programming the Winsock API. It is comprehensive, it is readable, and there is plenty of example code. The one quibble I have is that the authors sometimes assume a knowledge of UNIX programming. For example, on page 118, the authors state: "Both Windows NT and Windows 95 support threads. In a sense, a thread is a child process...". For anyone familiar with UNIX, a "child process" is certainly known territory, but for non-UNIX programmers, this could be confusing. That is only a very small grievance, however, and it is easy to forgive such oversight, especially when you look at the value of the book as a whole.


   [1] Hall, M. et. al. (1993). Windows Sockets: An Open Interface for Network Programming under Microsoft Windows. Version 1.1. January 20, 1993. Available in Postscript format via FTP at

   [2] The Center for Innovative Computer Applications no longer houses the Winsock programming library; it's now available

   [3] Stevens, W. R. (1990). UNIX Network Programming. Englewood Cliffs, NJ: Prentice Hall.

   [4] The current version of the Microsoft Foundation Class (MFC) 4.0 also includes classes for Winsock programming.

Tony Toyofuku ( is Electronic Services Librarian and Spanish and Portuguese Bibliographer at the University of California, Irvine.

Copyright © 1996 by Tony Toyofuku. This document may be reproduced in whole or in part for noncommercial, educational, or scientific purposes, provided that the preceding copyright statement and source are clearly acknowledged. All other rights are reserved. For permission to reproduce or adapt this document or any part of it for commercial distribution, address requests to the author at

image | ter issues

   REVIEW OF: Byron Spinney. Ethernet Tips and Techniques: For Designing, Installing and Troubleshooting Your Ethernet Network (2nd ed.). Fort Washington, PA: CBM Books, 1995.

by Thomas C. Wilson

The preface of this book states, "...if you are interested in getting started with Ethernet networking, and you want to learn how to design, install and troubleshoot basic Ethernet networks, this book is for you." It provides a less-than-100-page overview and guide to Ethernet networks; at a suggested price of $15.00, it could be a good introduction and reference book for someone new to Ethernet.

The first two chapters, which deal with general considerations relating to Ethernet, such as versions, frame types, and media, offer a solid, quick immersion in Ethernet basics. The chapter on network hardware, however, suffers from a lack of final edits and some confusion about where particular devices reside in the network layers. As networking options that cross or merge categories proliferate, it may be difficult to simplify descriptions in a fashion necessary for a book this brief. On the other hand, adding to the ambiguity of terminology does not assist the network administrator in designing, installing, or troubleshooting a network.

In "Network Design," the author provides a mixed bag of recommendations. His three basic rules, "keep it simple," "document everything," and "stay within the rules," are well-stated and wisely included. His comments on media changes, physical access, and cable lengths would warm the heart of any haggard network administrator. He lists questions, however, to be answered by users as part of the design process. For example, "How often will each person use the network?", "Who will need to communicate with whom and how?", and "How large are the files that will be printed and how often will they be printed?" Such questions cannot accurately be answered by users, or anyone else for that matter. The author's coverage of cabling challenges, connectors, tools, site planning and preparation, and equipment selection are excellent, albeit brief. A short case study illustrating the principles outlined is included.

"Network Installation" includes a review of project management issues for the administrator who is contracting to have a network installed. The author again emphasizes documenting everything. Some technical information, such as using a Time Domain Reflectometer for cable testing, is included. The case study is continued.

The book ends with a chapter on maintenance which offers more detail on specific types of tools and techniques for keeping a network operational. The author emphasizes the need for methodical troubleshooting and preventative maintenance. A glossary and index are provided.

I have mixed opinions about this book. On the one hand, it is a helpful, brief introduction to Ethernet networking; on the other it is not a lengthy enough volume to delve into important distinctions. The book contains useful information for planning a network if the reader is not particularly technically inclined, but it also includes some sections that require a fairly astute understanding of networking technologies. Overall it is a source of good advice for either the non-technical manager who must oversee the installation of a network or the technician who has been asked to install a small to medium-sized Ethernet network. There are errors, however, as mentioned above.

For an inexpensive book, it accomplishes what it sets out to do. The question in my mind is whether or not it might be worth spending the extra money to get more information. For example, the following items offer excellent networking introductions and planning guides:

Hancock, B. (1988). Designing and Implementing Ethernet Networks (2nd ed.). Wellesley, MA: QED Information Sciences.

Hancock, B. (1989). Network Concepts and Architectures. Wellesley, MA: QED Information Sciences.

Nemzow, M. A. W. (1992). The Ethernet Management Guide: Keeping the Link (2nd ed.). New York: McGraw-Hill.

While these books are substantially more expensive (i.e., $30 - $50 apiece) and somewhat dated, they offer more complete treatments of the technical and planning issues surrounding Ethernet networking. None of these books, including the reviewed one, cover more recent developments like Switched Ethernet, 100BASE-T, or 100VG-AnyLAN.

Tom Wilson, Editor-in-Chief TER,

Copyright © 1996 by Thomas C. Wilson. This document may be reproduced in whole or in part for noncommercial, educational, or scientific purposes, provided that the preceding copyright statement and source are clearly acknowledged. All other rights are reserved. For permission to reproduce or adapt this document or any part of it for commercial distribution, address requests to the author at

image | ter issues

   About TER