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?