<< |
Winsock Programmer's FAQ |
>> |
![]() WinSock 2.0
by Lewis Napper Book reviewed 9/7/1998, updated 9/8/1998 and 4/18/2000 NOTE: This book is no longer in print. This was the first Winsock 2.0 book out, but unfortunately it was also the first one to leave the market. Apparently IDG didn't want to compete with the likes of Microsoft Press and Addison Wesley, both of whom have or will soon have Winsock 2 books. This book is still worth a read if you can find it, though, and don't yet have a book on Winsock 2. If you look at the book on the shelf, it's deceptively large. Indeed, this paperback volume is wider than Quinn and Shute's hardback masterpiece. Yet, it has fewer pages than Quinn and Shute. Also, the last hundred or so pages are given to reference material and appendices, much of which you can glean from the text. The book could have been about half its current thickness if the Quick Reference chapter was axed, and if the book was printed on thinner paper. That, of course, would not have pleased IDG's Marketing department. Sigh. Okay, to the meat. Fair and simple, Napper delivers on the cover's promises. Having read through this book, you will understand Winsock 1.1 and 2.0, and you will be able to write programs to use the new APIs. This book doesn't have the makings to dethrone the classics, but it is a solid, useful book that you won't regret plonking down your credit card for. Napper's opus is divided into four main parts. The first section mainly covers the base BSDish parts of the Winsock API. I can happily report that he presents some working, useful console-mode Winsock programs early on. Another interesting feature of this book that appears early on is that the author describes all of the Winsock APIs in reference-like detail interwoven with the prose. (This is why I think the Quick Reference chapter should have been axed.) In the next section, the author covers the rest of the Winsock 1.1 API, mainly the asynchronous additions to the base Berkeley sockets stuff, but also some of the optional and Microsoft-specific things in the older API. In this section the author also covers MFC's CSocket and CAsyncSocket classes. Unfortunately, the author does not use these classes later in the book. Instead, everything is straight-to-the-API. That philosophy has its points, but I prefer well-architected C++ MFC/OWL-based code to super-efficient, compiler-agnostic C code. I think it would have been interesting if Napper had extended the MFC Winsock classes, and added a few more later in the book to cover Winsock 2.0 functionality. (Note: Davis' Win32 Network Programming has a very fine class library; it's alone in the field in that respect.) After Napper disposes of Winsock 1.1 and the MFC classes that wrap it, he moves on to Winsock 2.0. Like the text before it, this coverage is no-nonsense, easy-to-read prose that's more like a highly-annotated reference manual than a tutorial. That is, it presents each main section of the API, with function prototype descriptions and such, along with code to exercise it. This makes the book well-suited to both learning the API and as a reference. You can play with the running code samples to see how you use each section of the API, yet the book doesn't spend a lot of time developing fancy class libraries or talking about barely-related APIs, so it's easy to look up functions, and then see working code close by. Finally, Napper presents several client and server example programs. The two main servers show the differences in asynchronous and threaded architectures, and the last chapter covers protocol-independent client and server programs. One disappointment is that the author does not cover I/O completion ports. This is not strictly Winsock, but it is as justifiable to cover this as it is to cover Microsoft's ICMP.DLL API. Also, the author does not cover the new Service Provider Interface of Winsock 2. Granted, most Winsockers will never have to mess with the SPI, but to date, I know of no books that do cover the SPI, and it would have been good to put that lack behind us. The author could have used the last hundred pages for that, instead of for a boiled-down copy of the reference material. The Bottom LineThis is a fine book to learn Winsock from. It may not satisfy you through guru-hood, but it's cheaper and easier to read than its competition. Once you've outgrown the book's tutorial nature, you can still use the book as a credible reference, when the API docs leave you mystified. Related ResourcesLewis Napper's sockaddr.com web site is the online component to his book. In particular, check out the book-specific section of the site, and the book source code section. IDG Books Worldwide has a site for this book. Nothing special, of course. There are several reviews of this book at Amazon.com. I believe that the overall rating of three stars (as I write this review) is due to a few one and two-star reviews by the vocal minority, and by people who bought this book for the wrong reasons. I think a four-star rating would be more fair. |
<< Win32 Network Programming | TCP/IP Illustrated >> |
Last modified on 29 April 2000 at 15:52 UTC-7 | Please send corrections to tangent@cyberport.com. |
< Go to the main FAQ page |
|
<<< Go to my Home Page |