阅读265 返回首页    go 微软 go windows


Windows Socket WSASend in IOCP

i have a problem with WSASend.

i use PostQuenedCompletionStatus to commit a send task to IOCP procedure(AKA WorkerThread),no doubt,WSA_IO_PEDDING returned.

this process is like this,

step 1:WorkerThread is running,and GetQueuedCompletionStatus is (blocked) waitting for something.

step 2:PostQuenedCompletionStatus gives something to WorkerThread.

step 3:WSASend done and WSA_IO_PEDDING returned.this circle is finished.

step 4:GetQueuedCompletionStatus cotinue to wait for something.


the problem is comming!!!

step 4 will get a "NumberOfBytesTransferrd" equals to sent bytes on step3(this is sencond time,first time is PostQuenedCompletionStatus ),but the physical network layer is still sending data,WSASend just copy data to kernel memory,and

GetQueuedCompletionStatus tell you send finished.

is there any way to know the data is really sent to remote or get a notification callback???

(NOTE:the last parameter of WSASend cannot use in IOCP).

thank you!



最后更新:2017-05-12 10:43:04

  上一篇:go 硬盘空间被不知道什么文件占用了30多G,找不到在哪里删除
  下一篇:go 小娜播不了音乐