15 writes to _connection
System.Net.Http (15)
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (2)
414_connection = null; 434_connection = null;
System\Net\Http\SocketsHttpHandler\ChunkedEncodingWriteStream.cs (1)
80_connection = null;
System\Net\Http\SocketsHttpHandler\ConnectionCloseReadStream.cs (3)
31_connection = null; 83_connection = null; 144_connection = null;
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (3)
51_connection = null; 113_connection = null; 168_connection = null;
System\Net\Http\SocketsHttpHandler\ContentLengthWriteStream.cs (1)
57_connection = null;
System\Net\Http\SocketsHttpHandler\HttpContentStream.cs (2)
12_connection = connection; 28_connection = null;
System\Net\Http\SocketsHttpHandler\RawConnectionStream.cs (3)
37_connection = null; 85_connection = null; 147_connection = null;
79 references to _connection
System.Net.Http (79)
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (39)
31if (_connection == null) 57if (_connection == null) 64buffer.Length >= _connection.ReadBufferSize && 65_chunkBytesRemaining >= (ulong)_connection.ReadBufferSize) 71Debug.Assert(_connection.RemainingBuffer.Length == 0); 73int bytesRead = _connection.Read(buffer.Slice(0, (int)Math.Min((ulong)buffer.Length, _chunkBytesRemaining))); 93_connection.Read(buffer); 127if (_connection == null) 152if (_connection == null) 166Debug.Assert(_connection != null); 168CancellationTokenRegistration ctr = _connection.RegisterCancellation(cancellationToken); 173if (_connection == null) 180buffer.Length >= _connection.ReadBufferSize && 181_chunkBytesRemaining >= (ulong)_connection.ReadBufferSize) 187Debug.Assert(_connection.RemainingBuffer.Length == 0); 189int bytesRead = await _connection.ReadAsync(buffer.Slice(0, (int)Math.Min((ulong)buffer.Length, _chunkBytesRemaining))).ConfigureAwait(false); 209await _connection.ReadAsync(buffer).ConfigureAwait(false); 250_connection == null ? Task.CompletedTask : 256CancellationTokenRegistration ctr = _connection!.RegisterCancellation(cancellationToken); 270if (_connection == null) 315Debug.Assert(_connection != null); 326if (!_connection.TryReadNextChunkedLine(out currentLine)) 361ReadOnlyMemory<byte> connectionBuffer = _connection.RemainingBuffer; 370_connection.ConsumeFromRemainingBuffer(bytesToConsume); 382if (!_connection.TryReadNextChunkedLine(out currentLine)) 400if (_connection.ParseHeaders(IsDisposed ? null : _response, isFromTrailer: true)) 413_connection.CompleteResponse(); 433_connection!.Dispose(); 470Debug.Assert(_connection != null); 479drainedBytes += _connection.RemainingBuffer.Length; 490if (_connection == null) 502TimeSpan drainTime = _connection._pool.Settings._maxResponseDrainTime; 512ctr = cts.Token.Register(static s => ((HttpConnection)s!).Dispose(), _connection); 528Debug.Assert(_connection is not null); 530? _connection.FillForHeadersAsync(async: false) 531: _connection.FillAsync(async: false); 538Debug.Assert(_connection is not null); 540? _connection.FillForHeadersAsync(async: true) 541: _connection.FillAsync(async: true);
System\Net\Http\SocketsHttpHandler\ConnectionCloseReadStream.cs (3)
20HttpConnection? connection = _connection; 42HttpConnection? connection = _connection; 99HttpConnection? connection = _connection;
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
607if (stream is HttpContentStream contentStream && contentStream._connection?._stream is Stream innerStream)
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (19)
25if (_connection == null) 37int bytesRead = _connection.Read(buffer); 50_connection.CompleteResponse(); 61if (_connection == null) 74ValueTask<int> readTask = _connection.ReadAsync(buffer); 82CancellationTokenRegistration ctr = _connection.RegisterCancellation(cancellationToken); 112_connection.CompleteResponse(); 128if (_connection == null) 134Task copyTask = _connection.CopyToContentLengthAsync(destination, async: true, _contentBytesRemaining, bufferSize, cancellationToken); 146Debug.Assert(_connection != null); 147CancellationTokenRegistration ctr = _connection.RegisterCancellation(cancellationToken); 167_connection!.CompleteResponse(); 176Debug.Assert(_connection != null); 178ReadOnlyMemory<byte> connectionBuffer = _connection.RemainingBuffer; 187_connection.ConsumeFromRemainingBuffer(bytesToConsume); 197Debug.Assert(_connection != null); 214TimeSpan drainTime = _connection._pool.Settings._maxResponseDrainTime; 224ctr = cts.Token.Register(static s => ((HttpConnection)s!).Dispose(), _connection); 231await _connection.FillAsync(async: true).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs (2)
37HttpConnection? connection = _connection; 74HttpConnection? connection = _connection; // Will be null after drain succeeds
System\Net\Http\SocketsHttpHandler\HttpContentStream.cs (3)
25if (_connection != null) 27_connection.Dispose(); 37HttpConnection? c = _connection;
System\Net\Http\SocketsHttpHandler\HttpContentWriteStream.cs (3)
21public sealed override bool CanWrite => _connection != null; 24_connection?.Flush(); 28HttpConnection? connection = _connection;
System\Net\Http\SocketsHttpHandler\RawConnectionStream.cs (9)
21public sealed override bool CanRead => _connection != null; 22public sealed override bool CanWrite => _connection != null; 26HttpConnection? connection = _connection; 49HttpConnection? connection = _connection; 101HttpConnection? connection = _connection; 152HttpConnection? connection = _connection; 171HttpConnection? connection = _connection; 188public override void Flush() => _connection?.Flush(); 197HttpConnection? connection = _connection;