commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oglu...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server SimpleHttpServer.java
Date Mon, 24 Nov 2003 23:14:33 GMT
oglueck     2003/11/24 15:14:33

  Modified:    httpclient/src/test/org/apache/commons/httpclient/server
                        Tag: HTTPCLIENT_2_0_BRANCH SimpleHttpServer.java
  Log:
  Added support for systems with more than one network interface.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.4   +12 -6     jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/SimpleHttpServer.java
  
  Index: SimpleHttpServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/server/Attic/SimpleHttpServer.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- SimpleHttpServer.java	24 Nov 2003 20:41:11 -0000	1.1.2.3
  +++ SimpleHttpServer.java	24 Nov 2003 23:14:33 -0000	1.1.2.4
  @@ -119,13 +119,21 @@
       }
   
       /**
  -     * Returns the TCP port on which this HTTP server instance is bound to.
  +     * Returns the TCP port that this HTTP server instance is bound to.
        *
        * @return  TCP port, or -1 if not running
        */
       public int getLocalPort() {
           return server.getLocalPort();
       }
  +    
  +    /**
  +     * Returns the IP address that this HTTP server instance is bound to.
  +     * @return String representation of the IP address or <code>null</code>
if not running
  +     */
  +    public String getLocalAddress() {
  +    	return server.getInetAddress().getHostAddress();
  +    }
   
       /**
        * Checks if this HTTP server instance is running.
  @@ -202,8 +210,6 @@
               conn.connectionClose();
               ErrorResponse.getInstance().getResponse(HttpStatus.SC_SERVICE_UNAVAILABLE).processRequest(conn);
           }
  -
  -        conn.getWriter().flush();
       }
   
       public void run() {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message