3 writes to Payload
System.Net.Security (3)
System\Net\Security\SslStream.Protocol.cs (3)
1405Payload = RentBuffer ? ArrayPool<byte>.Shared.Rent(Size) : new byte[Size]; 1419Payload = RentBuffer ? ArrayPool<byte>.Shared.Rent(Size + size) : new byte[Size + size]; 1440Payload = 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)
330Debug.Assert(token.Payload != null); 331await TIOAdapter.WriteAsync(InnerStream, new ReadOnlyMemory<byte>(token.Payload!, 0, token.Size), cancellationToken).ConfigureAwait(false); 334NetEventSource.Log.SentFrame(this, token.Payload); 658SendAuthResetSignal(new ReadOnlySpan<byte>(alertToken.Payload), ExceptionDispatchInfo.Capture(CreateCertificateValidationException(sslAuthenticationOptions, sslPolicyErrors, chainStatus)));
System\Net\Security\SslStream.Protocol.cs (11)
1400Debug.Assert(Payload == null); 1406payload.CopyTo(new Span<byte>(Payload, 0, Size)); 1417var oldPayload = Payload; 1422oldPayload.AsSpan<byte>().CopyTo(Payload); 1430internal int Available => Payload == null ? 0 : Payload.Length - Size; 1431internal Span<byte> AvailableSpan => Payload == null ? Span<byte>.Empty : new Span<byte>(Payload, Size, Available); 1433internal ReadOnlyMemory<byte> AsMemory() => new ReadOnlyMemory<byte>(Payload, 0, Size); 1437Debug.Assert(Payload != null || Size == 0); 1439byte[]? toReturn = Payload;