Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » Httprequest always timeouts
Httprequest always timeouts [message #47723] Sat, 11 March 2017 15:44 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Hi, I've got a problem on HttRequest, just on windows (but not sure if on linux it works just because the download is faster).
The code is this one:

	HttpRequest http;
	http.Url(url);

	http.Timeout(1000000000);
	http.GlobalTimeout(1000000000);
	http.MaxContentSize(1000000000);
	
	// execute till finished
	http.New();
	int tim = msecs();
	while(http.Do() && !http.IsTimeout() && !http.IsError())
	{
		int len =  http.GetContentLength();
		if(len)
			progress(http.GetContent().GetCount(), len);
	}
	tim = msecs() - tim;
	RLOG("TIME IS " << tim << " ms");



I tried with GlobalTimeout(), Timeout(), Blocking() and all I could think about, but the download of a large file (some 170 MB)
always timeouts after exactly 120 seconds.
Any solution ?
Re: Httprequest always timeouts [message #47726 is a reply to message #47723] Sun, 12 March 2017 10:33 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Found that RequestTimeout() do the job... Now I wonder about the meaning of Timeout() and GlobalTimeout()...
Re: Httprequest always timeouts [message #47747 is a reply to message #47726] Sat, 18 March 2017 15:28 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Timeout / GlobalTimeout are about socket used to perform TCP/IP.

RequestTimeout is HttpRequest feature.

All are pretty well documented IMO.
Previous Topic: Error in RpcServer example
Next Topic: MDNS (Apple's Bonjour)
Goto Forum:
  


Current Time: Thu Mar 28 09:15:31 CET 2024

Total time taken to generate the page: 0.01073 seconds