By now you might be wondering how to choose the I/O model you should use when designing your application. As we've mentioned, each model has its strengths a nd weaknesses. All of the I/O models do require fairly complex programming com pared with developing a simple blocking-mode application with many servicing t hreads. We offer the following suggestions for client and server development. Client Development When you are developing a client application that manages one or more sockets, we recommend using overlapped I/O or WSAEventSelect over the other I/O models for performance reasons. But, if you are developing a Windows-based applicati on that manages window messages, the WSAAsyncSelect model might be a better ch oice because WSAAsyncSelect lends itself to the Windows message model, and you r application is already set up for handling messages. Server Development When you are developing a server that processes several sockets at a given tim e, we recommend using overlapped I/O over the other I/O models for performance reasons. However, if you expect your server to service a large number of I/O requests at any given time, you should consider using the I/O completion port model for even better performance. -- [0;1;32m�� ��源:��泉������ http://bbs.sdu.edu.cn [FROM: 202.194.32.132][m
CNUsenet