N
Nuno Magalhaes
In a simple thread I have a code like the one below:
public void ProtectionRun()
{
while(true)
{
//Sleep thread for one minute
//Thread.Sleep(60000);
HttpWebRequest
wReq=(HttpWebRequest)WebRequest.Create("http://pipa.inov.pt/cgi-bin/camera");
HttpWebResponse wRes=(HttpWebResponse)wReq.GetResponse();
MessageBox.Show("Completed...");
}
}
The problem is: "It only completes 2 times...". Why doesn't it get
completed all the times I want... and why does it hangs (on the thread
of course) in GetResponse() method?
Any help is appreciated,
Nuno Magalhaes.
public void ProtectionRun()
{
while(true)
{
//Sleep thread for one minute
//Thread.Sleep(60000);
HttpWebRequest
wReq=(HttpWebRequest)WebRequest.Create("http://pipa.inov.pt/cgi-bin/camera");
HttpWebResponse wRes=(HttpWebResponse)wReq.GetResponse();
MessageBox.Show("Completed...");
}
}
The problem is: "It only completes 2 times...". Why doesn't it get
completed all the times I want... and why does it hangs (on the thread
of course) in GetResponse() method?
Any help is appreciated,
Nuno Magalhaes.