Re: Question about IO Completion Port with Socket

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On 16 май, 22:00, Kevin LZJ <Kevin...@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

So, if the handle is invalid (socket closed or file closed), how about the behavior of IOCP?

If socket is closed and IOCP have pending IO requests,
GetQueuedCompletionStatus will return with lpNumberOfBytes == 0.
You should not use PostQueuedCompletionStatus for this.

.