The ServerSocket API spec states that a bind operation on an
already bound socket should throw IOException but it throws
SocketException. True for solaris, win98.
---test code ------
InetAddress[] myInetAddress = InetAddress.getAllByName(localhost);
ServerSocket mySS = new ServerSocket(3343, 5, myInetAddress[0]);
InetSocketAddress myIsa = new InetSocketAddress(
myInetAddress[0],3343);
mySS.bind(myIsa);
--------------------
java.net.SocketException: Already bound
at java.net.ServerSocket.bind(ServerSocket.java:291)
at java.net.ServerSocket.bind(ServerSocket.java:265)
test file attached.
already bound socket should throw IOException but it throws
SocketException. True for solaris, win98.
---test code ------
InetAddress[] myInetAddress = InetAddress.getAllByName(localhost);
ServerSocket mySS = new ServerSocket(3343, 5, myInetAddress[0]);
InetSocketAddress myIsa = new InetSocketAddress(
myInetAddress[0],3343);
mySS.bind(myIsa);
--------------------
java.net.SocketException: Already bound
at java.net.ServerSocket.bind(ServerSocket.java:291)
at java.net.ServerSocket.bind(ServerSocket.java:265)
test file attached.