0

I am using IOCP to develop a local proxy server. I am able to read first request from a connection and send back its response successfully. In case if that's a persistent connection, i am trying to read second request from it after sending response to first request. I am able to read 2nd request from client(browser) and writing it(using WSASend()) to proxy socket which handles connection with actual server. But GetQueuedCompletionStatus() is not triggering at the end of writing second request. I checked association of this proxy socket with the completion port and its associated correctly.

I checked this http connection in wireshark and it shows that second request has been sent correctly and received its response.

So the problem is GetQueuedCompletionStatus() is not triggering at the end of writing second request.

How to fix this?

mani_g
  • 151
  • 1
  • 2
  • 8
  • uploaded my code here http://www.files.com/shared/530c3433a1963/IOCP.doc – mani_g Feb 25 '14 at 06:10
  • The code's horrible. Factor stuff out of the main completion handling loop into some functions, remove duplicate code. As you tidy it up you will likely find the bug in your code that is causing you problems. – Len Holgate Feb 25 '14 at 09:50

0 Answers0