hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r233553 - /jakarta/httpclient/trunk/coyote-httpconnector/src/tests/tests/performance/PerformanceTest.java
Date Fri, 19 Aug 2005 20:37:47 GMT
Author: olegk
Date: Fri Aug 19 13:37:44 2005
New Revision: 233553

URL: http://svn.apache.org/viewcvs?rev=233553&view=rev
Log:
Changed to use the correct socket factory depending upon the mode (NIO vs OldIO)

Modified:
    jakarta/httpclient/trunk/coyote-httpconnector/src/tests/tests/performance/PerformanceTest.java

Modified: jakarta/httpclient/trunk/coyote-httpconnector/src/tests/tests/performance/PerformanceTest.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/coyote-httpconnector/src/tests/tests/performance/PerformanceTest.java?rev=233553&r1=233552&r2=233553&view=diff
==============================================================================
--- jakarta/httpclient/trunk/coyote-httpconnector/src/tests/tests/performance/PerformanceTest.java
(original)
+++ jakarta/httpclient/trunk/coyote-httpconnector/src/tests/tests/performance/PerformanceTest.java
Fri Aug 19 13:37:44 2005
@@ -52,6 +52,7 @@
 import org.apache.http.impl.io.DefaultHttpDataReceiverFactory;
 import org.apache.http.impl.io.DefaultHttpDataTransmitterFactory;
 import org.apache.http.impl.io.NIOSocketFactory;
+import org.apache.http.impl.io.OldIOSocketFactory;
 import org.apache.http.io.SocketFactory;
 import org.apache.http.params.HttpParams;
 import org.apache.http.params.HttpProtocolParams;
@@ -157,7 +158,12 @@
             }
         }
 		
-        SocketFactory socketfactory = NIOSocketFactory.getSocketFactory();
+        SocketFactory socketfactory = null;
+        if (useNIO) {
+        	socketfactory = NIOSocketFactory.getSocketFactory();
+        } else {
+        	socketfactory = OldIOSocketFactory.getSocketFactory();
+        }
         Protocol http = new Protocol("http", socketfactory, 80);
         HttpHost host = new HttpHost("localhost", port, http);
 



Mime
View raw message