PATCH: java.net.ServerSocket

Bryce McKinlay bryce@albatross.co.nz
Thu Dec 2 02:05:00 GMT 1999


The JDK 1.2 docs say "If bindAddr is null, it will default accepting
connections on any/all local addresses.", and
Volanomark cares. I'm commiting this, I think its minor enough to not
require approval.

regards

  [ bryce ]

1999-12-02  Bryce McKinlay  <bryce@albatross.co.nz>

        * libjava/java/net/ServerSocket.java (ServerSocket): Bind to any

        interface if bindAddr is null.

===================================================================
RCS file: /cvs/java/libgcj/libjava/java/net/ServerSocket.java,v
retrieving revision 1.6
diff -u -r1.6 ServerSocket.java
--- ServerSocket.java   1999/08/03 00:30:53     1.6
+++ ServerSocket.java   1999/12/02 10:01:36
@@ -52,7 +52,7 @@
     if (s != null)
       s.checkListen(port);
     impl.create(true);
-    impl.bind(bindAddr, port);
+    impl.bind(bindAddr == null ? ANY_IF : bindAddr, port);
     impl.listen(backlog);
   }





More information about the Java-patches mailing list