Imported Upstream version 6.12.0.86

Former-commit-id: 7a84ce7d08c42c458ac8e74b27186ca863315d79
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-07-10 08:44:59 +00:00
parent 92747312ea
commit 0b380204a4
812 changed files with 26901 additions and 9053 deletions

View File

@ -488,6 +488,26 @@ namespace System.Net.Security
return Impl.WriteAsync (buffer, offset, count, cancellationToken);
}
public override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
return TaskToApm.Begin (Impl.ReadAsync (buffer, offset, count), callback, state);
}
public override int EndRead (IAsyncResult asyncResult)
{
return TaskToApm.End<int> (asyncResult);
}
public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
return TaskToApm.Begin (Impl.WriteAsync (buffer, offset, count), callback, state);
}
public override void EndWrite (IAsyncResult asyncResult)
{
TaskToApm.End (asyncResult);
}
#else // !SECURITY_DEP
const string EXCEPTION_MESSAGE = "System.Net.Security.SslStream is not supported on the current platform.";