/// <summary>
 /// Instantiates a new <see cref="HttpTunnelConnectionFactory"/>.
 /// </summary>
 /// <param name="httpConnection">The <see cref="HttpConnection"/> to open a tunnel over.</param>
 /// <param name="httpVersion">The HTTP version to establish the connect tunnel over.</param>
 /// <param name="httpVersionPolicy">A policy controlling what HTTP version will be used for the connect tunnel.</param>
 /// <param name="ownsConnection">If true, the <paramref name="httpConnection"/> will be disposed when the <see cref=" HttpTunnelConnectionFactory"/> tunnel is disposed.</param>
 public HttpTunnelConnectionFactory(HttpConnection httpConnection, HttpPrimitiveVersion httpVersion, HttpVersionPolicy httpVersionPolicy, bool ownsConnection = false)
 {
     _httpConnection    = httpConnection ?? throw new ArgumentNullException(nameof(httpConnection));
     _httpVersion       = httpVersion ?? throw new ArgumentNullException(nameof(httpVersion));
     _httpVersionPolicy = httpVersionPolicy;
     _ownsConnection    = ownsConnection;
 }
 private async Task <HttpResponseMessage> SendAsync(HttpConnection connection, HttpRequestMessage request, CancellationToken cancellationToken)
 {
     HttpPrimitiveVersion requestVersion = request.Version switch
     {
         { MajorRevision : 1, MinorRevision : 0 } => HttpPrimitiveVersion.Version10,
 public PooledHttp1Connection(Connection connection, HttpPrimitiveVersion version) : base(connection, version)
 {
 }