1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 17:44:48 +09:00

Added missing *Async overrides to TlsStream (#91750)

Co-authored-by: Manicka <manicka@Manickas-MacBook-Pro.local>
This commit is contained in:
Marie Píchová 2023-09-08 15:20:08 +02:00 committed by GitHub
parent f3c7893c52
commit 5a6d5ef9a9
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,8 @@ using System.Net.Security;
using System.Net.Sockets;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using System.Threading;
using System.Threading.Tasks;
namespace System.Net
{
@ -46,6 +48,11 @@ namespace System.Net
_sslStream.EndAuthenticateAsClient(asyncResult);
}
public override void Write(byte[] buffer, int offset, int size)
{
_sslStream.Write(buffer, offset, size);
}
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback? callback, object? state)
{
return _sslStream.BeginWrite(buffer, offset, size, callback, state);
@ -56,9 +63,9 @@ namespace System.Net
_sslStream.EndWrite(result);
}
public override void Write(byte[] buffer, int offset, int size)
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
_sslStream.Write(buffer, offset, size);
return _sslStream.WriteAsync(buffer, offset, count, cancellationToken);
}
public override int Read(byte[] buffer, int offset, int size)
@ -66,6 +73,11 @@ namespace System.Net
return _sslStream.Read(buffer, offset, size);
}
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
return _sslStream.ReadAsync(buffer, offset, count, cancellationToken);
}
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
{
return _sslStream.BeginRead(buffer, offset, count, callback, state);