您的位置:首页 > 其它

CompletionPort

2015-10-01 11:03 225 查看
CompletionPort

1、CreateIoCompletionPort。此方法用于创建与绑定。此方法调用后,socket即退出,只能通过CompletionKey来辨认是哪个socket的消息。

  


  CompletionKey是自定义数据,用于区分FileHandle。

  NumberOfConcurrentThreads [in]

  The maximum number of threads that the operating system can allow to concurrently process I/O completion packets for the I/O completion port. This parameter is ignored if the ExistingCompletionPortparameter is not NULL.

  If this parameter is zero, the system allows as many concurrently running threads as there are processors in the system.

参考:https://msdn.microsoft.com/en-us/library/windows/desktop/aa363862(v=vs.85).aspx

2、GetQueuedCompletionStatus。 

  


  Returns nonzero (TRUE) if successful or zero (FALSE) otherwise.

参考:https://msdn.microsoft.com/en-us/library/windows/desktop/aa364986(v=vs.85).aspx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: