W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 1999

listen on specified ipaddress

From: Christopher William Turner <cwturner@cycom.co.uk>
Date: Sun, 3 Jan 1999 09:07:45 -0500 (EST)
Message-ID: <368F790E.B4ED268E@cycom.co.uk>
To: "www-jigsaw@w3.org" <www-jigsaw@w3.org>
I changed the implementation of this method in
so as to allow jigsaw to only listen on a specified ipadress.
This is required by some ISPs.
It can then be activated
by  a java commandline option, e.g.:-

    public ServerSocket createServerSocket()
 throws IOException
 String ipaddress = System.getProperty("ipaddress");
 if(ipaddress==null || ipaddress.length()<1){
         System.err.println("listening on default ipaddress");
  return new ServerSocket (server.getPort(), 128) ;
 } else {
     System.err.println("listening on "+ipaddress);
    InetAddress ina = InetAddress.getByName(ipaddress);     return new
ServerSocket(server.getPort(), 128, ina);


Chris Turner, http://www.cycom.co.uk/
Received on Sunday, 3 January 1999 10:30:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:28 GMT