58 references to Stream
InMemory.FunctionalTests (58)
BadHttpRequestTests.cs (3)
266await client.Stream.WriteAsync(Core.Internal.Http2.Http2Connection.ClientPreface.ToArray()).DefaultTimeout(); 268var data = await client.Stream.ReadAtLeastLengthAsync(17); 271Assert.Empty(await client.Stream.ReadUntilEndAsync().DefaultTimeout());
EventSourceTests.cs (2)
176return new ValueTask<Stream>(connection.Stream); 289await using var sslStream = new SslStream(connection.Stream);
Http2\Http2EndToEndTests.cs (1)
59return new ValueTask<Stream>(connection.Stream);
Http2\TlsTests.cs (1)
63var sslStream = new SslStream(connection.Stream);
HttpsConnectionMiddlewareTests.cs (29)
293var stream = OpenSslStream(connection.Stream); 323var stream = OpenSslStream(connection.Stream); 356var stream = OpenSslStream(connection.Stream); 391var stream = OpenSslStream(connection.Stream); 398var stream = OpenSslStream(connection.Stream); 426var stream = OpenSslStream(connection.Stream); 460var stream = OpenSslStream(connection.Stream); 488var stream = OpenSslStream(connection.Stream); 529var stream = OpenSslStreamWithCert(connection.Stream); 570var stream = OpenSslStreamWithCert(connection.Stream); 614var stream = OpenSslStreamWithCert(connection.Stream); 657var stream = OpenSslStreamWithCert(connection.Stream); 698var stream = OpenSslStreamWithCert(connection.Stream); 746var stream = OpenSslStreamWithCert(connection.Stream); 788var stream = new SslStream(connection.Stream); 852var stream = OpenSslStreamWithCert(connection.Stream, clientCertificate); 913var stream = OpenSslStreamWithCert(connection.Stream); 936var stream = OpenSslStream(connection.Stream); 969var stream = OpenSslStream(connection.Stream); 1002var stream = OpenSslStream(connection.Stream); 1054var stream = OpenSslStreamWithCert(connection.Stream); 1099var stream = OpenSslStreamWithCert(connection.Stream); 1152var stream = OpenSslStreamWithCert(connection.Stream); 1187var stream = OpenSslStreamWithCert(connection.Stream); 1214var stream = OpenSslStreamWithCert(connection.Stream); 1239var stream = OpenSslStreamWithCert(connection.Stream); 1264var stream = OpenSslStreamWithCert(connection.Stream); 1298var stream = OpenSslStreamWithCert(connection.Stream); 1403using var stream = OpenSslStream(connection.Stream);
HttpsTests.cs (10)
92using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 213await connection.Stream.WriteAsync(new byte[10], 0, 10); 255using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 299using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 330using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 383Assert.Equal(0, await connection.Stream.ReadAsync(new byte[1], 0, 1).DefaultTimeout()); 417Assert.Equal(0, await connection.Stream.ReadAsync(new byte[1], 0, 1).DefaultTimeout()); 694using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 735using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true)) 774using (var sslStream = new SslStream(connection.Stream, true, (sender, certificate, chain, errors) => true))
KestrelMetricsTests.cs (5)
559return new ValueTask<Stream>(connection.Stream); 638return new ValueTask<Stream>(connection.Stream); 712return new ValueTask<Stream>(connection.Stream); 791return new ValueTask<Stream>(connection.Stream); 881return new ValueTask<Stream>(connection.Stream);
RequestTests.cs (4)
2270await connection.Stream.WriteAsync(new byte[] { 0x16, 0x03, 0x01, 0x02, 0x00, 0x01, 0x00, 0xfc, 0x03, 0x03, 0x03, 0xca, 0xe0, 0xfd, 0x0a }).DefaultTimeout(); 2305await connection.Stream.WriteAsync(Encoding.UTF32.GetBytes("£")).DefaultTimeout(); 2353var writer = new StreamWriter(client.Stream, Encoding.GetEncoding("iso-8859-1")); 2356await client.Stream.FlushAsync().ConfigureAwait(false);
ResponseTests.cs (1)
4710using (var reader = new StreamReader(connection.Stream, Encoding.ASCII, detectEncodingFromByteOrderMarks: true, bufferSize: 1024, leaveOpen: true))
TestTransport\InMemoryHttpClientSlim.cs (2)
35using (var stream = await GetStream(connection.Stream, requestUri, validateCertificate).ConfigureAwait(false)) 74using (var stream = await GetStream(connection.Stream, requestUri, validateCertificate).ConfigureAwait(false))