文件名称:iocpJTLV4
- 所属分类:
- Internet/网络编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 51kb
- 下载次数:
- 0次
- 提 供 者:
- D***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
从上次我完成比较基本的完成端口到现在已经过去了一个月,在这个月中基本是在研究这个完成端口。经过无数的查阅,参考了不少高手的文章终于完成。
这里面用到了比较多的技术。
1。用取函数指针的方法运行ACCEPTEX函数。
2。用链表结构做成一个内存池,事实上是个CLIST链表。。。生成,取一个块,释放,放回链表
3。并没有使用线程池,因为我发现根本不能提高效率,反而降低了。从原理上分析,就应当是这样的。如果编得好,就不应当用到很多的线程。如果用到了很多线程,说明线程中的代码效率有问题。如果需要加入,这倒很简单。
4。对ACCEPT投递量做检测。如果不够再投。
最重要的,对代码做了几乎最完全的注释。
效果上我用一个网上找来的测试软件,15000个并发连接那是相当的淡定。
另外,可能是我在内存池上的代码编得不够好,在DEBUG下效果就很差,但如果用Release,效果就变得好上许多。
这是头文件。-From the last time I finished the basic completion port has been underway for a month, this month is the basic study the completion port. After countless inspection, with reference to the many expert articles finally completed.
There is used a lot more technology.
A. Take function pointer run ACCEPTEX function.
Two. List structure made of a memory pool, in fact, a linked list of CLIST. . . Generation, to take a block and released back into the linked list
3. Did not use the thread pool, because I did not improve efficiency, but reduces the. In principle, analysis, should be so. If the Code is well, you should not use a lot of threads. If you use a lot of thread, the thread code efficiency. If you need to join, it would really simple.
4. ACCEPT delivery amount to do the testing. If not reinvested.
Most importantly, the code to do almost the most complete comment.
In effect, I got an online test software, 15000 concurrent connections it is quite calm.
In addition, y
这里面用到了比较多的技术。
1。用取函数指针的方法运行ACCEPTEX函数。
2。用链表结构做成一个内存池,事实上是个CLIST链表。。。生成,取一个块,释放,放回链表
3。并没有使用线程池,因为我发现根本不能提高效率,反而降低了。从原理上分析,就应当是这样的。如果编得好,就不应当用到很多的线程。如果用到了很多线程,说明线程中的代码效率有问题。如果需要加入,这倒很简单。
4。对ACCEPT投递量做检测。如果不够再投。
最重要的,对代码做了几乎最完全的注释。
效果上我用一个网上找来的测试软件,15000个并发连接那是相当的淡定。
另外,可能是我在内存池上的代码编得不够好,在DEBUG下效果就很差,但如果用Release,效果就变得好上许多。
这是头文件。-From the last time I finished the basic completion port has been underway for a month, this month is the basic study the completion port. After countless inspection, with reference to the many expert articles finally completed.
There is used a lot more technology.
A. Take function pointer run ACCEPTEX function.
Two. List structure made of a memory pool, in fact, a linked list of CLIST. . . Generation, to take a block and released back into the linked list
3. Did not use the thread pool, because I did not improve efficiency, but reduces the. In principle, analysis, should be so. If the Code is well, you should not use a lot of threads. If you use a lot of thread, the thread code efficiency. If you need to join, it would really simple.
4. ACCEPT delivery amount to do the testing. If not reinvested.
Most importantly, the code to do almost the most complete comment.
In effect, I got an online test software, 15000 concurrent connections it is quite calm.
In addition, y
(系统自动生成,下载前可以参看下载内容)
下载文件列表
iocp类V4\iocp类.clw
........\ReadMe.txt
........\iocp类.h
........\iocp类.cpp
........\StdAfx.cpp
........\iocp类.dsw
........\iocp类.ncb
........\iocp类.plg
........\iocp类.dsp
........\StdAfx.h
........\res\iocp类.rc2
........\...\iocp类.ico
........\Resource.h
........\iocp类Dlg.h
........\iocp类.aps
........\iocp类.rc
........\iocp类Dlg.cpp
........\iocp.h
........\iocp.cpp
........\iocp类.opt
........\Debug
........\res
........\Release
iocp类V4
........\ReadMe.txt
........\iocp类.h
........\iocp类.cpp
........\StdAfx.cpp
........\iocp类.dsw
........\iocp类.ncb
........\iocp类.plg
........\iocp类.dsp
........\StdAfx.h
........\res\iocp类.rc2
........\...\iocp类.ico
........\Resource.h
........\iocp类Dlg.h
........\iocp类.aps
........\iocp类.rc
........\iocp类Dlg.cpp
........\iocp.h
........\iocp.cpp
........\iocp类.opt
........\Debug
........\res
........\Release
iocp类V4