my code is:
System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create("http://192.168.2.2/web/movielist");
req.Timeout = 2000;
System.Net.WebResponse res = req.GetResponse();
System.IO.Stream responseStream = res.GetResponseStream();
The requested document (movielist) is a very large document, and it takes more than 10 seconds to complete.
I want to set only a timeout to establish the connection itself. As far as I can see, req.Timeout is a timeout for the whole request, which not only establishes a connection. There must not be a timeout to receive the document.
source
share