hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r451398 - /jakarta/httpcomponents/httpasync/trunk/src/java/org/apache/http/async/impl/SimpleHttpAsyncClientConnection.java
Date Fri, 29 Sep 2006 19:28:53 GMT
Author: olegk
Date: Fri Sep 29 12:28:52 2006
New Revision: 451398

URL: http://svn.apache.org/viewvc?view=rev&rev=451398
Log:
[HTTPCORE-14] Consider decoupling HttpHost and Scheme and moving Scheme, SocketFactory and
SecureSocketFactory to HttpConn

Changelog:
----------
* HttpHost is no longer coupled with the Scheme class
* ProxyHost removed 

Modified:
    jakarta/httpcomponents/httpasync/trunk/src/java/org/apache/http/async/impl/SimpleHttpAsyncClientConnection.java

Modified: jakarta/httpcomponents/httpasync/trunk/src/java/org/apache/http/async/impl/SimpleHttpAsyncClientConnection.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpasync/trunk/src/java/org/apache/http/async/impl/SimpleHttpAsyncClientConnection.java?view=diff&rev=451398&r1=451397&r2=451398
==============================================================================
--- jakarta/httpcomponents/httpasync/trunk/src/java/org/apache/http/async/impl/SimpleHttpAsyncClientConnection.java
(original)
+++ jakarta/httpcomponents/httpasync/trunk/src/java/org/apache/http/async/impl/SimpleHttpAsyncClientConnection.java
Fri Sep 29 12:28:52 2006
@@ -35,7 +35,6 @@
 import org.apache.http.HttpHost;
 import org.apache.http.async.HttpAsyncClientConnection;
 import org.apache.http.impl.SocketHttpClientConnection;
-import org.apache.http.io.SocketFactory;
 import org.apache.http.params.HttpParams;
 
 /**
@@ -67,11 +66,12 @@
             throw new IllegalStateException("Target host not specified");
         }
         assertNotOpen();
-        SocketFactory socketfactory = this.targethost.getScheme().getSocketFactory();
-        Socket socket = socketfactory.createSocket(
-                this.targethost.getHostName(), this.targethost.getPort(), 
-                null, 0, 
-                params);
+        String hostname = this.targethost.getHostName();
+        int port = this.targethost.getPort();
+        if (port == -1) {
+            port = 80;
+        }
+        Socket socket = new Socket(hostname, port);
         bind(socket, this.targethost, params);
     }    
 



Mime
View raw message