May 17th, 2010, 10:50 AM
GetQueuedCompletionStatus problem in I/O Completion model
I need urgent help ................
I have developed one small client application to receive video streaming from multiple CCTV cameras. I want to handle cameras using I/O completion model.
1) I have created completion port, Worker thread and added socket to this completion port
2) I called WSARecv with overlapped parameter to receive video stream data from camera. WSARecv returned 0 as return value. Which indicates overlapped operation completes immediately. I processed the data.
3) Now worker thread is waiting on GetQueuedCompletionStatus in a while loop. It came out from waiting and I read the data successfully because there is a data in socket.
4) After the above operation I called again WSARecv in worker thread which is in loop to receive data. Now WSAREcv returned error WSA_IO_PENDING. This is fine because it indicates that it will complete later.
Problem is after above step 4 GetQueuedCompletionStatus never returns even though there is a huge streaming data coming from Camera.
Please Please do needful
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!