c++ - How do I configure the timeout on HttpEndRequest? -


background: i'm maintaining old c++ app communicates company's servers. no 1 @ company (including me) has significant experience c++ or many of other technologies being used.

the problem: trying upload file code looks this:

if(httpsendrequestex(hreq, &inbuf, null, hsr_initiate, 0)) {     unsigned long ulwrote;     bool bwrote;     bwrote = internetwritefile(hreq, postdata, postdatalength, &ulwrote);      if(bwrote)     {         if(!httpendrequest(hreq, null, 0, 0))         {             dword errorcode = getlasterror(); // 12002 - timeout         }     } } 

there's lots of other error-handling going on here, i've stripped down i'm seeing problem.

small files upload without problem, larger files (~25mb) encountering timeout. though timeout occurring, many times file upload successfully, don't think it's problem on server side. suppressing or ignoring error seems wrong haven't found way set timeout more reasonable level.

wininet provides internetsetoption() control behaviour, in case @ the internet_option_send_timeout flag.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -