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