C++ Windows IOCP - HTTP POST data missing
- by Mike Trader
I have written a very simple IOCP HTTP server that works for the GET verb, but not POST.
I create a socket and a listen thread in which accept() is waiting for a connection.
When a client connects I call ioctlsocket() to unblock the socket then I associate the socket with IOCP and finally call WSARecv() to read the data.
Some data is indeed read and when that has happened, IOCP wakes up a worker thread via GetQueuedCompletionStatus() and I recover the request data.
I only ever get the request header when I POST from any browser. Any suggestions as to why?
I am assuming the IOCP completes when ALL the data has arrived from TCP?