I use some libraries in a C ++ program to connect and select other websites. I mainly used Chillkat and Curl. However, I recently started programming my own HTTP receiver using MSDN and the Winsocket2 library.
I programmed my software to open a socket of type SOCKET_STREAM for Ipv4, and then I establish a connection to the desired website and send a GET request with the headers "Host:" and "Connection: close" to the server. Everything seems to be working fine, but the performance is not what I expected. The included Chillkat library is still preforms better than mine. Despite the fact that I optimized mine as much as I can.
I notice that when I submit a request, some servers take longer to respond. And as soon as they do this, they send everything right away. So how can I make a header request that triggers a quick response? Speed is very important for my program.
source
share