tags:

views:

8

answers:

0

I'm writing a client app that continuously polls my server for updates.

I'm using c++ wininet. Are there any tips on how to minimize request time? Are there any flags I should use to these methods, http headers I should set, what handles should I reuse?

while(true)
{
   InternetOpen();
   InternetConnect();
   HttpOpenRequest();
   HttpSendRequest();
   while(moreToRead)
   {
      InternetReadFile();
   }
   CloseHandles();
}