--- a/jdk/src/share/sample/nio/chatserver/ChatServer.java Mon May 09 08:58:00 2011 -0700
+++ b/jdk/src/share/sample/nio/chatserver/ChatServer.java Mon May 09 18:45:33 2011 +0100
@@ -32,7 +32,7 @@
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
-import java.net.StandardSocketOption;
+import java.net.StandardSocketOptions;
import java.nio.channels.*;
import java.util.*;
import java.util.concurrent.Executors;
@@ -105,7 +105,7 @@
*/
private AsynchronousServerSocketChannel createListener(AsynchronousChannelGroup channelGroup) throws IOException {
final AsynchronousServerSocketChannel listener = openChannel(channelGroup);
- listener.setOption(StandardSocketOption.SO_REUSEADDR, true);
+ listener.setOption(StandardSocketOptions.SO_REUSEADDR, true);
listener.bind(new InetSocketAddress(port));
return listener;
}
@@ -123,7 +123,7 @@
private void handleNewConnection(AsynchronousSocketChannel channel) {
Client client = new Client(channel, new ClientReader(this, new NameReader(this)));
try {
- channel.setOption(StandardSocketOption.TCP_NODELAY, true);
+ channel.setOption(StandardSocketOptions.TCP_NODELAY, true);
} catch (IOException e) {
// ignore
}