3 writes to Payload
System.Net.Security (3)
System\Net\Security\SslStream.Protocol.cs (3)
1370
Payload
= RentBuffer ? ArrayPool<byte>.Shared.Rent(Size) : new byte[Size];
1384
Payload
= RentBuffer ? ArrayPool<byte>.Shared.Rent(Size + size) : new byte[Size + size];
1405
Payload
= null;
19 references to Payload
System.Net.Security (19)
System\Net\Security\SslStream.cs (2)
453
if (token.Size > 0 && token.
Payload
!= null)
455
return InnerStream.WriteAsync(new ReadOnlyMemory<byte>(token.
Payload
, 0, token.Size), default).AsTask();
System\Net\Security\SslStream.IO.cs (6)
305
Debug.Assert(token.
Payload
!= null);
306
await TIOAdapter.WriteAsync(InnerStream, new ReadOnlyMemory<byte>(token.
Payload
!, 0, token.Size), cancellationToken).ConfigureAwait(false);
309
NetEventSource.Log.SentFrame(this, token.
Payload
);
597
SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.
Payload
), ExceptionDispatchInfo.Capture(new AuthenticationException(SR.net_ssl_io_cert_custom_validation, null)));
602
SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.
Payload
), ExceptionDispatchInfo.Capture(new AuthenticationException(SR.Format(SR.net_ssl_io_cert_chain_validation, chainStatus), null)));
607
SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.
Payload
), ExceptionDispatchInfo.Capture(new AuthenticationException(SR.Format(SR.net_ssl_io_cert_validation, sslPolicyErrors), null)));
System\Net\Security\SslStream.Protocol.cs (11)
1365
Debug.Assert(
Payload
== null);
1371
payload.CopyTo(new Span<byte>(
Payload
, 0, Size));
1382
var oldPayload =
Payload
;
1387
oldPayload.AsSpan<byte>().CopyTo(
Payload
);
1395
internal int Available =>
Payload
== null ? 0 :
Payload
.Length - Size;
1396
internal Span<byte> AvailableSpan =>
Payload
== null ? Span<byte>.Empty : new Span<byte>(
Payload
, Size, Available);
1398
internal ReadOnlyMemory<byte> AsMemory() => new ReadOnlyMemory<byte>(
Payload
, 0, Size);
1402
Debug.Assert(
Payload
!= null || Size == 0);
1404
byte[]? toReturn =
Payload
;