/// <exception cref="System.IO.IOException"></exception> public virtual void RouteComplete(HttpClientConnection managedConn, HttpRoute route , HttpContext context) { Args.NotNull(managedConn, "Managed Connection"); Args.NotNull(route, "HTTP route"); lock (managedConn) { CPoolEntry entry = CPoolProxy.GetPoolEntry(managedConn); entry.MarkRouteComplete(); } }
/// <exception cref="System.IO.IOException"></exception> public virtual void Upgrade(HttpClientConnection managedConn, HttpRoute route, HttpContext context) { Args.NotNull(managedConn, "Managed Connection"); Args.NotNull(route, "HTTP route"); ManagedHttpClientConnection conn; lock (managedConn) { CPoolEntry entry = CPoolProxy.GetPoolEntry(managedConn); conn = entry.GetConnection(); } this.connectionOperator.Upgrade(conn, route.GetTargetHost(), context); }
/// <exception cref="System.IO.IOException"></exception> public virtual void Connect(HttpClientConnection managedConn, HttpRoute route, int connectTimeout, HttpContext context) { Args.NotNull(managedConn, "Managed Connection"); Args.NotNull(route, "HTTP route"); ManagedHttpClientConnection conn; lock (managedConn) { CPoolEntry entry = CPoolProxy.GetPoolEntry(managedConn); conn = entry.GetConnection(); } HttpHost host; if (route.GetProxyHost() != null) { host = route.GetProxyHost(); } else { host = route.GetTargetHost(); } IPEndPoint localAddress = route.GetLocalSocketAddress(); SocketConfig socketConfig = this.configData.GetSocketConfig(host); if (socketConfig == null) { socketConfig = this.configData.GetDefaultSocketConfig(); } if (socketConfig == null) { socketConfig = SocketConfig.Default; } this.connectionOperator.Connect(conn, host, localAddress, connectTimeout, socketConfig , context); }