You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jf...@apache.org on 2008/02/29 17:56:25 UTC
svn commit: r632388 -
/tomcat/connectors/trunk/jni/test/org/apache/tomcat/jni/SocketServerTestSuite.java
Author: jfclere
Date: Fri Feb 29 08:56:23 2008
New Revision: 632388
URL: http://svn.apache.org/viewvc?rev=632388&view=rev
Log:
cleaning.
Modified:
tomcat/connectors/trunk/jni/test/org/apache/tomcat/jni/SocketServerTestSuite.java
Modified: tomcat/connectors/trunk/jni/test/org/apache/tomcat/jni/SocketServerTestSuite.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/test/org/apache/tomcat/jni/SocketServerTestSuite.java?rev=632388&r1=632387&r2=632388&view=diff
==============================================================================
--- tomcat/connectors/trunk/jni/test/org/apache/tomcat/jni/SocketServerTestSuite.java (original)
+++ tomcat/connectors/trunk/jni/test/org/apache/tomcat/jni/SocketServerTestSuite.java Fri Feb 29 08:56:23 2008
@@ -34,6 +34,9 @@
public class SocketServerTestSuite extends TestCase {
private long serverSock = 0;
+ private int port=6666;
+ private String host="localhost";
+
public static long serverPool = 0;
public void testSocketServerTestSuite() throws Exception {
@@ -43,8 +46,8 @@
/* Create the server socket and listen on it */
serverPool = Pool.create(0);
- long inetAddress = Address.info("127.0.0.1", Socket.APR_INET,
- 6666, 0, serverPool);
+ long inetAddress = Address.info(host, Socket.APR_INET,
+ port, 0, serverPool);
serverSock = Socket.create(Socket.APR_INET, Socket.SOCK_STREAM,
Socket.APR_PROTO_TCP, serverPool);
int rc = Socket.bind(serverSock, inetAddress);
@@ -139,7 +142,7 @@
private class Client extends java.lang.Thread {
java.net.Socket sock;
public Client() throws Exception {
- sock = new java.net.Socket("localhost", 6666);
+ sock = new java.net.Socket(host, port);
}
public void run() {
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org