3 writes to Payload
System.Net.Security (3)
System\Net\Security\SslStream.Protocol.cs (3)
1476Payload = RentBuffer ? ArrayPool<byte>.Shared.Rent(Size) : new byte[Size]; 1490Payload = RentBuffer ? ArrayPool<byte>.Shared.Rent(Size + size) : new byte[Size + size]; 1511Payload = null;
17 references to Payload
System.Net.Security (17)
System\Net\Security\SslStream.cs (2)
457if (token.Size > 0 && token.Payload != null) 459return InnerStream.WriteAsync(new ReadOnlyMemory<byte>(token.Payload, 0, token.Size), default).AsTask();
System\Net\Security\SslStream.IO.cs (4)
312Debug.Assert(token.Payload != null); 313await TIOAdapter.WriteAsync(InnerStream, new ReadOnlyMemory<byte>(token.Payload!, 0, token.Size), cancellationToken).ConfigureAwait(false); 316NetEventSource.Log.SentFrame(this, token.Payload); 651SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(CreateCertificateValidationException(sslAuthenticationOptions, sslPolicyErrors, chainStatus)));
System\Net\Security\SslStream.Protocol.cs (11)
1471Debug.Assert(Payload == null); 1477payload.CopyTo(new Span<byte>(Payload, 0, Size)); 1488var oldPayload = Payload; 1493oldPayload.AsSpan<byte>().CopyTo(Payload); 1501internal int Available => Payload == null ? 0 : Payload.Length - Size; 1502internal Span<byte> AvailableSpan => Payload == null ? Span<byte>.Empty : new Span<byte>(Payload, Size, Available); 1504internal ReadOnlyMemory<byte> AsMemory() => new ReadOnlyMemory<byte>(Payload, 0, Size); 1508Debug.Assert(Payload != null || Size == 0); 1510byte[]? toReturn = Payload;