diff options
Diffstat (limited to 'crypto/src/tls/TlsStream.cs')
-rw-r--r-- | crypto/src/tls/TlsStream.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/src/tls/TlsStream.cs b/crypto/src/tls/TlsStream.cs index 01b990799..5c07da2bf 100644 --- a/crypto/src/tls/TlsStream.cs +++ b/crypto/src/tls/TlsStream.cs @@ -58,6 +58,13 @@ namespace Org.BouncyCastle.Tls return m_handler.ReadApplicationData(buffer, offset, count); } +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + public override int Read(Span<byte> buffer) + { + return m_handler.ReadApplicationData(buffer); + } +#endif + public override int ReadByte() { byte[] buf = new byte[1]; @@ -80,6 +87,13 @@ namespace Org.BouncyCastle.Tls m_handler.WriteApplicationData(buffer, offset, count); } +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + public override void Write(ReadOnlySpan<byte> buffer) + { + m_handler.WriteApplicationData(buffer); + } +#endif + public override void WriteByte(byte value) { m_handler.WriteApplicationData(new byte[]{ value }, 0, 1); |