⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ws20.html

📁 SDK FAQ集
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><html lang="en"><head><title>Winsock Programmer's FAQ: Reviews</title><link rel="Stylesheet" type="text/css" href="../faq.css"></head><body bgcolor="#ffffee" text="#000000" link="#491e00" vlink="#7d2e01" alink="#da7417"><!--  ---- Header Bar ----  --><table border="0" width="95%" bgcolor="#006000" cellpadding="5" cellspacing="3" align="center">	<tr>		<td align="left" bgcolor="#e0e0c0">			<font size="2" face=Verdana,Arial,Helvetica>				<b><a href="../reviews/w32np.html">&lt;&lt;</a></b>			</font>		</td>		<td align="center">			<font face=Verdana,Arial,Helvetica color="#ffffee">				<p align=center class=bigger3><b>				Winsock Programmer's FAQ<br>				Section 8: Reviews<br>				</b></p>			</font>			</td>		<td align="right" bgcolor="#e0e0c0">			<font size="2" face=Verdana,Arial,Helvetica>				<b><a href="../reviews/tcpip-ill-v1.html">&gt;&gt;</a></b>			</font>		</td>	</tr></table><!--  ---- Body Table ----  --><table width="95%" border="0" cellpadding="10">	<tr valign="top">		<td><img src="bitmaps/ws20-cover.jpg" width=166 height=210 alt="cover image" align=right><h3><i>WinSock 2.0</i></h3><p class=inset>by Lewis Napper<br>IDG Books Worldwide, December 1997<br>543 pp., with source code and extras on CD-ROM<br>ISBN 0-7645-8049-3<br>$39.95 list</p><p class=inset>Book reviewed 9/7/1998, updated 9/8/1998 and 4/18/2000</p><br clear=all><p><font size=-1><b>NOTE: This book is no longer in print.</b> This wasthe first Winsock 2.0 book out, but unfortunately it was also the firstone to leave the market. Apparently IDG didn't want to compete with thelikes of Microsoft Press and Addison Wesley, both of whom have or willsoon have Winsock 2 books. This book is still worth a read if you canfind it, though, and don't yet have a book on Winsock 2.</font></p><p>If you look at the book on the shelf, it's deceptively large. Indeed,this paperback volume is wider than <a href="wsnp.html">Quinn andShute</a>'s hardback masterpiece. Yet, it has fewer pages than Quinn andShute. Also, the last hundred or so pages are given to reference materialand appendices, much of which you can glean from the text. The bookcould have been about half its current thickness if the Quick Referencechapter was axed, and if the book was printed on thinner paper. That,of course, would not have pleased IDG's Marketing department. Sigh.</p><p>Okay, to the meat. Fair and simple, Napper delivers on the cover'spromises. Having read through this book, you will understand Winsock 1.1and 2.0, and you will be able to write programs to use the new APIs. Thisbook 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.</p><p>Napper's opus is divided into four main parts. The first sectionmainly covers the base BSDish parts of the Winsock API. I can happilyreport that he presents some working, useful console-mode Winsock programsearly on. Another interesting feature of this book that appears early onis that the author describes all of the Winsock APIs in reference-likedetail interwoven with the prose. (This is why I think the Quick Referencechapter should have been axed.)</p><p>In the next section, the author covers the rest of the Winsock 1.1API, mainly the asynchronous additions to the base Berkeley socketsstuff, but also some of the optional and Microsoft-specific things inthe older API.</p><p>In this section the author also covers MFC's CSocket and CAsyncSocketclasses. Unfortunately, the author does not use these classes later inthe book. Instead, everything is straight-to-the-API. That philosophyhas its points, but I prefer well-architected C++ MFC/OWL-based code tosuper-efficient, compiler-agnostic C code. I think it would have beeninteresting if Napper had extended the MFC Winsock classes, and addeda few more later in the book to cover Winsock 2.0 functionality. (Note:Davis' <i><a href="w32np.html">Win32 Network Programming</a></i> has avery fine class library; it's alone in the field in that respect.)</p><p>After Napper disposes of Winsock 1.1 and the MFC classes that wrapit, he moves on to Winsock 2.0. Like the text before it, this coverageis no-nonsense, easy-to-read prose that's more like a highly-annotatedreference manual than a tutorial. That is, it presents each main sectionof the API, with function prototype descriptions and such, along with codeto exercise it. This makes the book well-suited to both learning the APIand as a reference. You can play with the running code samples to see howyou use each section of the API, yet the book doesn't spend a lot of timedeveloping fancy class libraries or talking about barely-related APIs,so it's easy to look up functions, and then see working code close by.</p><p>Finally, Napper presents several client and server exampleprograms. The two main servers show the differences in asynchronous andthreaded architectures, and the last chapter covers protocol-independentclient and server programs.</p><p>One disappointment is that the author does not cover I/O completionports. This is not strictly Winsock, but it is as justifiable to coverthis as it is to cover Microsoft's ICMP.DLL API. Also, the author doesnot cover the new Service Provider Interface of Winsock 2. Granted, mostWinsockers will never have to mess with the SPI, but to date, I know ofno books that do cover the SPI, and it would have been good to put thatlack behind us. The author could have used the last hundred pages forthat, instead of for a boiled-down copy of the reference material.</p><h4>The Bottom Line</h4><p>This is a fine book to learn Winsock from. It may not satisfyyou through guru-hood, but it's cheaper and easier to read than itscompetition. Once you've outgrown the book's tutorial nature, you canstill use the book as a credible reference, when the API docs leaveyou mystified.</p><h4>Related Resources</h4><p>Lewis Napper's <a href="http://www.sockaddr.com">sockaddr.com</a> website is the online component to his book. In particular, check out the<a href="http://www.sockaddr.com/WinSockBook.html">book-specificsection</a> of the site, and the <ahref="http://www.sockaddr.com/ExampleSourceCode.html">book source code</a>section.</p><p><ahref="http://www.idgbooks.com/cgi-bin/db/fill_out_template.pl?idgbook:0-7645-8049-3:book-idg::uidg1659">IDGBooks Worldwide</a> has a site for this book. Nothing special, ofcourse.</p><p>There are several reviews of this book at <a href="http://www.amazon.com/exec/obidos/ASIN/0764580493/winsockprogramme"> Amazon.com</a>. I believe that the overall ratingof three stars (as I write this review) is due to a few one and two-starreviews by the vocal minority, and by people who bought this book forthe wrong reasons. I think a four-star rating would be more fair.</p>		</td>	</tr></table><!--  ---- Document Footer ----  --><hr noshade size=1 color=#404040><table cellpadding=5 cellspacing=0 border=0 width=95% align=center> 	<tr>		<td align=left>		    <a href="../reviews/w32np.html">&lt;&lt; Win32 Network Programming</a>		</td>		<td align=right>		    <a href="../reviews/tcpip-ill-v1.html">TCP/IP Illustrated &gt;&gt;</a>		</td>	</tr>	<tr>		<td align=left>			<i>Last modified on 29 April 2000 at 15:52 UTC-7</i>		</td>		<td align=right>			<font size=-1>Please send corrections to <a href="mailto:tangent@cyberport.com">tangent@cyberport.com</a>.</font>		</td>	</tr>	</table>	<table cellpadding=5 cellspacing=0 border=0 width=95% align=center> 	<tr>		<td align=left width=33%>			<font size=-1>				<a href="../index.html"><b>&lt;</b> Go to the main FAQ page</a>			</font>		</td>		<td width=33%>			<font size=-1>			<center>				<a href="http://www.cyberport.com/~tangent/programming"><b>&lt;&lt;</b> Go to my Programming pages</a>			</center>			</font>		</td>		<td align=right width=33%>			<font size=-1>				<a href="http://www.cyberport.com/~tangent/"><b>&lt;&lt;&lt;</b> Go to my Home Page</a>			</font>		</td>	</tr>	</table>	</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -