3 writes to Payload
System.Net.Security (3)
System\Net\Security\SslStream.Protocol.cs (3)
1516Payload = RentBuffer ? ArrayPool<byte>.Shared.Rent(Size) : new byte[Size]; 1530Payload = RentBuffer ? ArrayPool<byte>.Shared.Rent(Size + size) : new byte[Size + size]; 1551Payload = 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); 659SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(CreateCertificateValidationException(sslAuthenticationOptions, sslPolicyErrors, chainStatus)));
System\Net\Security\SslStream.Protocol.cs (11)
1511Debug.Assert(Payload == null); 1517payload.CopyTo(new Span<byte>(Payload, 0, Size)); 1528var oldPayload = Payload; 1533oldPayload.AsSpan<byte>().CopyTo(Payload); 1541internal int Available => Payload == null ? 0 : Payload.Length - Size; 1542internal Span<byte> AvailableSpan => Payload == null ? Span<byte>.Empty : new Span<byte>(Payload, Size, Available); 1544internal ReadOnlyMemory<byte> AsMemory() => new ReadOnlyMemory<byte>(Payload, 0, Size); 1548Debug.Assert(Payload != null || Size == 0); 1550byte[]? toReturn = Payload;