閱讀265 返回首頁    go iPhone_iPad_Mac_apple


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 小娜播不了音樂