public override int Read (byte [] buffer, int offset, int size)
{
AsyncCallback cb = cb_wrapper;
WebAsyncResult res = (WebAsyncResult) BeginRead (buffer, offset, size, cb, null);
if (!res.IsCompleted && !res.WaitUntilComplete (ReadTimeout, false)) {
nextReadCalled = true;
cnc.Close (true);
throw new WebException ("The operation has timed out.", WebExceptionStatus.Timeout);
}
return EndRead (res);
}