?? winsockapi_wrappers.shtml
字號:
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Author" CONTENT="Zafir Anjum">
<TITLE>Internet - Winsock API Wrapper Classes</TITLE>
</HEAD>
<body background="../fancyhome/back.gif" bgcolor="#FFFFFF" link="#B50029" vlink="#8E2323" alink="#FF0000">
<table WIDTH="100%">
<tr WIDTH="100%">
<td align=center><!--#exec cgi="/cgi/ads.cgi"--><td>
</tr>
</table>
<CENTER><H3><FONT COLOR="#AOAO99">Winsock API Wrapper Classes</FONT></H3></CENTER>
<HR>
<p>This sample was contributed by <a href="mailto:poul@wizsoft.com">Poul A Costinski</a></p>
<P>Creating multithreaded TCP/IP server - one like WWW server -:)
for NT becomes frequent task novadays. MFC supplies several socket
classes, but, from my experience, they are just unusable for this purpose.
They fail all the time, and several 1000s (!) times slower than raw Winsock
interface.
<P>Facing the challenge, I wrote my own thin wrapper classes around socket API,
together with template for server, and it was surprisingly simple.
<P>The complete example project is in file RawSocketServerExample.ZIP.
<P>Several notes for class usage:
<P>Server's thread dispatcher for client-server environment.
<H4>Class CWizThreadDispatcher.</H4>
Uses pure virtual helper class CWizMultiThreadedWorker.
Serves regular situation when requests come from many clients to the
server.
<P>Dispatcher starts to serve the client in the separate thread and continues to
wait for requests. The number of parallel threads is limited for
effectiveness. The actual work (whatever it is)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -