I/O 完成端口动态链接库(I/O Completion Port DLL)

 

引言

本文的目的是探索windows提供的IO完成端口模型,并比较其他可用等待IO完成的模式。

大型软件经常需要上千个端口连接,如果一个端口对应于一个线程,意味着这些线程的系统花费巨大,IOCP对于“一个线程一个客户”的薄弱问题给予了一种有效的解决方式,用一些运行的线程和异步输入(输出)发送(接收)。 IOCP技术被广泛应用在不同类型的高性能服务器,比如Apache等等。我已经维护lssIocp.dll 两年了,并且我希望我的捐献能对某些人有所帮助。

背景

这是我第一篇文章。我的英语不是十分好,但是我希望得到大家的鼓励。三年前,我需要一个至少能维护5000条连接的高性能服务器,IOCP是最佳解决方案。我在Code Project 的帮助下编写了lssIocp.dll,现在我希望各位能帮我进一步完善它。

代码使用

要使用lssIocp.dll,你需要在你的工程中包含头文件iocpdef.h,并且增加一个名字为InitIocp的函数。

 

 

 

 
 

 

原文地址:
http://www.codeproject.com/KB/threads/completion_port_dll.aspx
 

Introduction

The purpose of this article is to explore the IO Completion Port mechanism provided in Windows and compare it with the other mechanisms available to wait for an IO completion.
Large-scale software often needs tens of thousands of socket connections, and if one socket corresponds to one thread, meaning the thread costs the system great expense, IOCP presents an efficient solution to the "one-thread-per-client" bottleneck problem (among others), using only a few processing threads and asynchronous input/output send/receive. The IOCP technology is widely used for different types of high performance servers, such as Apache etc. The lssIocp.dll was something I maintained for two years (IOCP’s storehouse), and I hope my contribution can help somebody.

Background

This is my first article. My English is not very good, but I hoped to obtain everybody's encouragement. Three year’s ago, I needed a high performance server that could maintain 5000 connections at least, and the IOCP was the best solution. I wrote the lssIocp.dll with the help of the Code Project, and now I hope that everybody helps me to further consummate it. 

Using the Code

To use lssIocp.dll, you need to include iocpdef.h to your project, and add a function named InitIocp
Collapse Copy Code

 
 

 

 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值