|
Thank you all for your help, I finally want to take a big step forward and I can receive data from the client. I found that WSARecv () called after accept is equivalent to setting the buffer and other things, and GetQueuedCompletionStatus uses these things to fill the buffer. If the buffer is large enough, WSARecv () after GetQueuedCompletionStatus () is not necessary. Conversely, if the buffer is not large enough, WSARecv () is necessary, and each time WSARecv () will affect the buffer of GetQueuedCompletionStatus ().
Not all the inside story of IOCP is clear, but it is already moving forward.
toxop000:
I also think it should be your order, but I can still follow the previous order. Presumably the functions of Winsock are smart enough? Information is stored in the system when WSARecv () is called, so calling CreateIoCompletionPort () afterwards can also IO normally?
Is there a master to share the inside story? |
|