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