A Network Communication Development Library (Mnet). If you are interested, you can download it.
The socket functions of TCP and UDP are encapsulated, and three Winsock I/O models, including port completion, wsaeventselect, and select, are encapsulated. Combined with the thread pool + Memory Pool Mode, high concurrency is supported.
Visual Studio 2005 is used for compilation.
Source codeIncluded in the provided sample project.
Briefly describe the sample project:
It simulates 3000 concurrent client connections. Each connection sends 3000 files to the server at the same time, and the server receives the files and stores them in the receive directory.
Mnet_test.sln is the main solution file, which can be opened directly with Visual Studio.
Mnetdll: Contains mlib and Mnet library, where mlib Technical Manual word Version Download: http://download.csdn.net/source/2922935
CHM download: http://download.csdn.net/source/2923715
Server: testing serverProgram
Client: client program for testing
Test method:
Run server.exeand client.exe in the output directory. The files used for testing are in the same directory. If the client connection fails, modify the TCP Parameters of the Registry. For more information, seeArticle: Http://blog.csdn.net/visualwind/archive/2010/08/08/5796568.aspx
Note: Due to personal time, energy, and level constraints, there must be many shortcomings. Please forgive me.
Mnet Technical Documentation download: http://download.csdn.net/source/2926021 CHM Version Download: http://download.csdn.net/source/2926024
Sample project SourceCodeDownload: http://download.csdn.net/source/2926010
Technical Discussion QQ: 6658306