Date: Fri, 14 Aug 1998 05:27:44 -0700 (PDT) From: Mark Diekhans <markd@Grizzly.COM> To: freebsd-java@FreeBSD.ORG, java-port@FreeBSD.ORG Subject: ServerSocket broken in jdk1.1.6.V98-7-21 Message-ID: <199808141227.FAA04877@osprey.grizzly.com>
index | next in thread | raw e-mail
ServerSocket no longer works correctly in the 1.1.6.V98-7-21. It appears
not to set SO_REUSEADDR. Thus attempts to reopen a server socket fails
until the kernel decides to recycle the port. This worked correctly
in 1.1.5.V98-2-8. The enclosed program demonstrates the problem.
Is there a new release planned?
Thanks,
Mark
import java.net.*;
import java.io.*;
public class SocketBug {
static final int PORT = 2222;
public static void main(String[] args) throws IOException {
ServerSocket ss = new ServerSocket(PORT, 5);
System.out.print("To test, connect to " + PORT + " ... ");
Socket s = ss.accept();
System.out.println("connected");
s.close();
ss.close();
System.out.print("Ok setting up socket again " + PORT + " ... ");
ss = new ServerSocket(PORT, 5);
s = ss.accept();
System.out.println("connected");
s.close();
ss.close();
}
}
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808141227.FAA04877>
