-
June 18th, 2010, 03:25 AM
#1
IOCP problem: GetQueuedCompletionStatus vs WSARecv
hello alls
This is my first attempt to use IOCP and I need advice.
I am using IOCP on client side, my CP associated with socket.
I have created WorkersThreads with cycle inside like as
OVERLAPPED* pOl = NULL;
while( true ) {
. pOl = NULL;
BOOL bRes = GetQueuedCompletionStatus(
hPort,
&dwBytesXferred,
(LPDWORD)&lpPerSocketContext,
&pOl,
INFINITE);
...
< how can I get packet from servr here ? >
}
It is OK. This is only skeleton, I have omitted error's checkup.
My question is:
How can I get data, sent by server, immediately after GetQueuedCompletionStatus?
Can anybody point me to source with clear description how to do it?
Because founded examples implement WSAREcv after GetQueuedCompletionStatus,
but it is not so appropriate solution, like using mechanism only for signalling of events..
Thanks a lot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|