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

📄 general.html

📁 SDK FAQ集
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<p>The other major source for 16-bit Winsock stacks is as part of a"network suite", but these products are becoming extremely hard tofind. (Microsoft's free stacks coupled with shareware and freewareapplications have made this software category obsolete.)</p><p>Keep in mind that you can't copy a Winsock DLL to another machine andexpect it to work. You have to get and install a complete network stack,including its proprietary Winsock layer.</p><a name="getws2"></a><h5>1.7 - Can I get Winsock 2 for...?</h5><p><b>...Windows 98, Windows NT 4.0 or Windows 2000?</b></p><p>These platforms already come with Winsock 2.</p><p><b>...Windows 95?</b></p><p>Windows 95 ships with Winsock 1.1, but you can get theWinsock 2 SDK as part of the <ahref="http://www.microsoft.com/msdownload/platformsdk/setuplauncher.htm">WindowsPlatform SDK</a>. (Sorry, there's no longer a place whereyou can get <i>just</i> the Winsock SDK.) You may also need the <ahref="http://www.microsoft.com/windows95/downloads/contents/WURecommended/S_WUNetworking/dunwinsky2k/Default.asp">Winsock2 Update</a> package; you will definitely need to tell your users aboutthis, if they wish to use your program on Windows 95.</p><p><b>...Windows 3.1? Windows NT 3.5x?</b></p><p>Unfortunately, Winsock 2 will not run on Windows 3.1 or Windows NT3.51, so those users will have to upgrade to a newer operating systemor stick with Winsock 1.1. (See <a href="#ws2additions">above</a> fora list of what Winsock 2 includes <img src="./bitmaps/waist-dot.gif" alt="-" width=7 height=6 hspace=2> you may not <i>need</i>Winsock 2's advanced features for your application.)</p><a name="othersys"></a><h5>1.8 - Is there a version of Winsock for...?</h5><p><b>...DOS?</b><br><p>DOS cannot support Winsock, because Winsock depends greatly on Windows'messaging and DLL mechanisms.</p><p>(Before I discuss alternatives to Winsock for DOS programmers, I wantto clear up a common confusion. Command-line windows under Windows95/98/NT/2000 are sometimes called "DOS boxes". This is a historical term,and is now inaccurate. In Win32, there's a new class of programs called"console mode programs". These console mode programs run in these "DOSboxes" and can look and feel like old DOS programs, but they can callany Win32 function, including Winsock. Note for example that all of the<a href=examples/index.html>examples</a> in the FAQ are console programs.)</p><p>Erick Engelke's <ahref="ftp://dark.uwaterloo.ca/pub/wattcp/index.html">WaterlooTCP</a> package is a freeware TCP/IP stack that runs over<a href="http://www.crynwr.com/">Crynwr</a>-style packetdrivers. I've used it myself, and it works very well. The <ahref="http://www.supro.com/wattcp.html">manual</a> is availablefor $50; if you plan on using this package to develop seriousapplications, trust me, this is a worthwhile investment. (Ifyou're just puttering around, you can probably figure thingsout by messing around with the example programs.)</a><p>Another option is JSB's <a href="http://www.jsb.com/">Virtual SocketLibrary</a>. It implements a common BSD sockets API for DOS, amongother systems. This is probably a better option than Waterloo TCP if youneed BSD sockets compatibility and multiplatform support. I've not usedit, though, so I can't actually endorse it.</p><p>NetManage (formerly FTP Software) offers the <ahref="http://www.netmanage.com/products/pctcpsdk/">PC/TCP SoftwareDevelopment Kit</a> for DOS. This appears to be roughly the same thing asthe JSB product, but since I haven't used this library either, I won'tcomment further on it.</p><p>Finally, Async Systems offers the <ahref="http://www.asyncsystems.com/tcpip.htm">Socket Library SDK</a>for DOS. This is a pure BSD-sockets workalike for DOS, with a fewcurious Winsock-isms like <code>closesocket()</code> instead of<code>close()</code>. You can download it for a free 90-dayevaluation.</p><p>There is one other rather interesting alternative: the <ahref="http://www.geocities.com/SiliconValley/Peaks/8523/">WSocklibrary</a> for the <a href="http://www.delorie.com/djgpp/">DJGPP</a>compiler. This library accesses the wsock.vxd or wsock.386 driverused by Microsoft's Windows for Workgroups 3.1 and Windows 95 Winsockstacks. Naturally these drivers only work while Windows is running,so you have to run such a DOS application in a DOS box. This methoddoes have a number of advantages: the DJGPP compiler is free, and thefact that it lets you program a Winsock application without writing aGUI can be a plus.</p><p>I personally dislike the WSock option unless you're stuck onWindows 3.1 and can't buy a commercial compiler. If you can stipulatethat your program must run on Windows 95 or Windows NT, you can getthis same low overhead by writing a console mode program with the <ahref="http://sourceware.cygnus.com/cygwin/">Cygwin</a> tool set, whichis essentially the same thing as DJGPP except for Win32.</p><p><b>...Unix?</b><br><p>Essentially all Unixes offer the BSD sockets API for TCP/IPprogramming, which is the ancestor of Winsock. Some older Unix versionsalso offer a competing API called XTI (or TLI in its older form), whichis similar enough to Winsock and BSD sockets that you won't have muchtrouble learning it if you know the sockets API.</p><p><b>...OS/2?</b><br><p>As of OS/2 Warp 4, OS/2 supports Winsock as well as its own socketsAPI. The Winsock emulation is part of OS/2's Open32 API, and probablyconforms to Winsock 1.1. (Winsock 2 is probably too Win32-specific forIBM to emulate it with any real degree of success.) OS/2's native socketsAPI is based on pure Berkeley sockets; in a sense, then, you can havea subset of Winsock without using the Open32 API. You mainly lose allthe functions that begin with "WSA".</p><p>OS/2 Warp 3.0 and earlier have extra-cost packages available thatadd TCP/IP support, including some support for the Winsock API.</p><p><b>...NetWare?</b><br><p>NetWare has had Winsock support since September of 1998. It's includedin NetWare 5, and can be had for NetWare 4 in Support Pack 8. Novell hasa <a href="http://developer.novell.com/ndk/ws2comp.htm">porting guide</a>that tells you what works and what doesn't in their implementation withrespect to Microsoft's.</p><p><b>...Win32s?</b><br><p>Win32s 1.1 contains a WSOCK32.DLL that thunks calls down to a 16-bitWINSOCK.DLL, if present. I have successfully used Win32s to run 32-bitWinsock programs over Trumpet Winsock and Microsoft's Wolverine stack.</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="intro.html">&lt;&lt; Introduction</a>		</td>		<td align=right>		    <a href="newbie.html">Information for New Winsockers &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 + -