I am working on an application in which I have to hit the URL and get the HTTP status code returned from that URL. I am currently using WININET functions to achieve this. Code for this:
hOpen = InternetOpenA ("MYAPP", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); hFile = InternetOpenUrlA (hOpen, url.c_str (), NULL, 0, INTERNET_FLAG_RELOAD, 0); HttpQueryInfoA (hFile, HTTP_QUERY_STATUS_CODE, (invalid *) buffer, & dwBufLen, NULL);
I did some checks to see the performance, and I see that the average number of strokes is about 300 milliseconds. Since I will make several calls, the total time is about 8-10 seconds, which slows down the entire application.
The same is achieved with a MAC address of about 100 milliseconds or so (I use COCOA).
So are there any other APIs for WIN that I can use to speed this up?
Thanks in advance, Amit
source
share