TIP 3:一个已投递的I/O操作和一个出列的完成通知的关联
来源:互联网 发布:mysql的日期函数 编辑:程序博客网 时间:2024/05/21 11:11
TIP 3: Associate a posted I/O operation with a dequeued completion packet.
GetQueuedCompletionStatus returns a completion key and an overlapped structure for the I/O when dequeuing a completion packet. You should use these two structures to return per handle and per I/O operation information, respectively. You can use your socket handle as the completion key when you register the socket with the IOCP to provide per handle information. To provide per I/O operation "extend" the overlapped structure to contain your application-specific I/O-state information. Also, make sure you provide a unique overlapped structure for each overlapped I/O. When an I/O completes, the same pointer to the overlapped I/O structure is returned.
GetQueuedCompletionStatus returns a completion key and an overlapped structure for the I/O when dequeuing a completion packet. You should use these two structures to return per handle and per I/O operation information, respectively. You can use your socket handle as the completion key when you register the socket with the IOCP to provide per handle information. To provide per I/O operation "extend" the overlapped structure to contain your application-specific I/O-state information. Also, make sure you provide a unique overlapped structure for each overlapped I/O. When an I/O completes, the same pointer to the overlapped I/O structure is returned.
当一个完成通知出列的时候,GetQueuedCompletionStatus返回了针对这个I/O一个完成键和一个重叠结构,你可以使用两个结构来分别接收返回的单句柄数据和单IO操作数据。当你把某个套接字和IOCP关联,你可以用套接字句柄作为完成键去提供单句柄信息。使用一个扩展的重叠结构其中包含了指定的I/O应用状态信息。区提供单IO操作数据服务。确认你为每一个重叠I/O操作,提供了一个唯一的重叠结构,当一个I/O完成,返回同一个指向重叠IO结构的指针
- TIP 3:一个已投递的I/O操作和一个出列的完成通知的关联
- TIP 4: I/O completion packet queuing behavior. I/O完成包的队列行为
- 计算最后一个出列者的编号
- 一个比较多线程(并行)和非多线程下完成同等任务(I/O频繁)所需开销的案例
- 一个非阻塞I/O的例子
- 一个简单的I/O读写锁
- I/O操作和进程一个案例
- Windows服务器端编程-第二章 设备IO和线程间通信-3-接收I/O请求的完成通知
- 《一个操作系统的实现》笔记(3)--中断和I/O保护
- 队列的入列和出列
- Linux 异步通知I/O的原理
- 重叠I/O完成例程模型如何同时投递WSARecv和WSASend
- [C#]I/O完成端口的实现
- [C#]I/O完成端口的实现
- 异步串口 I/O操作 中遇到的一个问题及解决
- Java:使用I/O流操作将一个图片复制到另一个文件夹下后打不开的解决方法
- 一群人围成一个圈,依次1,2,3报数,数到3的人出列,求最后出列的哪个人
- 带缓冲的I/O操作和不带缓冲的I/O操作
- 什么是锁单?
- 挑战自我,顽强抗争
- 接口继承Object 吗?
- JavaScript实现popup日期控件(二)
- JavaScript实现popup日期控件(三)
- TIP 3:一个已投递的I/O操作和一个出列的完成通知的关联
- 真的还想做程序员吗?
- Visual Studio .NET 2003的版本
- stringstream的使用_@pegasus.rutgers.edu
- session
- LINUX指令大全(完整版)之二
- Eclipse 运行命令行参数大全
- 解除心理枷锁
- 判断系统CPU是否空闲