KarstenK
Это разные очереди, и вполне логично, что один внешний или удаленный вход не ждет другого. Выходные данные являются локальными на машине Windows, так что постановка в очередь не является проблемой.
Но почему один входной порт должен ждать другого? Что делать, если у устройства есть какие-то проблемы? Ожидание - это не решение, но двигайтесь дальше, когда появляются данные.
Порты ввода-вывода немного похожи на IP-сеть на локальной машине ;-)
Member 10937201
thanks for your reply! I still can't understand what you describe,for example, if the remote address post to me it's data wiht characters "abcdefghi",for some reasons,i have to continuously post two WSARecv on the same socket but in the same workthread or in tow workthread concomitantly to obtain all of the characters.the buffer used in the first WSARecv filled by the some front characters of "abcdefghi" ,the buffer used in the Second WSARecv filled by the the rest of characters "abcdefghi" ,is that right? because the book《Network Programming For Microsoft Windows,Second Edition》by Anthony Jones,Jim Ohlund,said that,the buffer can be filled with the order of post WSARecv,that is guaranteed! therefore the IO completion package is also the same order,and they are queued in first-in-first-out (FIFO) order to the associated I/O completion port. and when a completion packet is released to a thread, the system releases the last (most recent) thread associated with that port, passing it the completion information for the oldest I/O completion. Whichever thread is released first,i should get the front data of the characters, but why the completion notification isn't order? so i still can't understand what your explanation. What does it have to do with the device, and What does the device mean?
за ответ спасибо!