public override Stream GetRequestStream()
{
IAsyncResult asyncResult = asyncWrite;
if (asyncResult == null) {
asyncResult = BeginGetRequestStream (null, null);
asyncWrite = (WebAsyncResult) asyncResult;
}
if (!asyncResult.AsyncWaitHandle.WaitOne (timeout, false)) {
Abort ();
throw new WebException ("The request timed out", WebExceptionStatus.Timeout);
}
return EndGetRequestStream (asyncResult);
}