43 lines
669 B
C#
43 lines
669 B
C#
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;
|
|
}
|
|
}
|
|
}
|