Book review by Ted Felix
I had to implement networking in my company's product within two weeks. I couldn't have done it without this book. This is the perfect reference for writing good TCP/IP code quickly. Covers Windows and Unix equally.
The Windows implementation of Berkeley sockets (Winsock) unfortunately
offers functionality that is incompatible with Berkeley sockets and
Microsoft encourages the use of these incompatible features. Specifically,
I'm referring to WSAEventSelect() as a replacement for Berkeley sockets
select().
Fortunately, you can completely avoid using
the winsock-specific APIs (WSA) and just use the normal Berkeley sockets API.
That's the sensible approach, and that is the approach used in this book.
Favorite quote (pg. 157): "The Winsock API specification ... refers to
using select for a timer as 'inexcusably lame.' One might
wonder where
the lameness lies when a system call does not perform according to its
published specification..." The infamous
Winsock Lame List has some really valid points, but as I mentioned,
recommending against using select() (see #23) simply because the process for
setting up, calling, and checking results is slightly involved, makes it
obvious that Microsoft's Keith Moore is only concerned with encouraging the
creation of non-portable code.
It's so typical of Microsoft, yet so lame. Oh and did I mention that
you should avoid the MFC CSocket and CAsyncSocket at all costs? I've
used them before, and they aren't pretty.
This book is great as it steers you clear of these Windows-specific issues and helps you write portable code.
<- Back to my software books page.
Copyright ©2005-2006, Ted Felix. Disclaimer