The threading part is for console apps I suppose. But if you go back to quetannon, you'll find that it's using the WSAAsyncSelect API for a non blocking style socket. Your app must be processing window messages in order to receive socket notifications.
You must register for the specific notifications you wish to receive, I.e when connected or received some bytes.
So after you receive the bytes you check the length as you mentioned and then continue to parse the HTTP headers and construct a response afterwards.
There's a trick of converting a socket handle to a FILE handle using fdopen but I don't recommend it.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum