Files
BeWoPlaner/BeWo/Core/BeWoWebClient.cs

43 lines
669 B
C#
Raw Permalink Normal View History

2016-06-27 01:45:38 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
namespace BeWo.Core
{
public class BeWoWebClient : WebClient
{
//time in milliseconds
private int timeout;
public int Timeout
{
get
{
return timeout;
}
set
{
timeout = value;
}
}
public BeWoWebClient()
{
this.timeout = 600000;
}
public BeWoWebClient(int timeout)
{
this.timeout = timeout;
}
protected override WebRequest GetWebRequest(Uri address)
{
var result = base.GetWebRequest(address);
result.Timeout = this.timeout;
return result;
}
}
}