中国开发网: 论坛: 程序员情感CBD: 贴子 366235
bjwf
实际上问题更麻烦
windows 网络编程里的一段话

All overlapped operations are guaranteed to be executed in the order that the application issued them. However, the completion notifications returned from a completion port are not guaranteed to be in that same order.That is, if an application posts two overlapped WSARecv operations, one with a 10 KB buffer and the next with a 12 KB buffer, the 10 KB buffer is filled first, followed by the 12 KB buffer. The application's worker thread may receive notification from GetQueuedCompletionStatus for the 12 KB WSARecv before the completion event for the 10 KB operation. Of course, this is only an issue when multiple operations are posted on a socket.

意思是说,先发的 WSARecv一定会先收,但不一定会被先通知到工作线程.考,所以一次提交多个WSARecv不会保证通知的顺序,这下不就麻烦了

.还是一次提交一个WSARecv放心些.

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录