diff options
| author | Michael Koch <konqueror@gmx.de> | 2002-11-18 11:26:03 +0000 |
|---|---|---|
| committer | Michael Koch <konqueror@gmx.de> | 2002-11-18 11:26:03 +0000 |
| commit | f917ebf14cd0e07719f74ea00d25f5f6e6d645df (patch) | |
| tree | d2aa94bdf9d6d0f1670d47afc3fcf0d7a7476666 /gnu/java/nio/ServerSocketChannelImpl.java | |
| parent | 49332699dc0c10b9010523a749400f2a8aab3de2 (diff) | |
| download | classpath-f917ebf14cd0e07719f74ea00d25f5f6e6d645df.tar.gz | |
2002-11-18 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/SelectorImpl.java
(select): Throww exception when selector is closed,
reinitialize counter before reusing it.
(implCloseSelector): Implemented.
(register): Added support for ServerSocketChannelImpl.
* gnu/java/nio/ServerSocketChannelImpl.java
(ServerSocketChannelImpl): Create server socket.
* gnu/java/nio/SocketChannelImpl.java: Reformated.
* java/net/ServerSocket.java
(ServerSocket): Create unbound socket.
* java/nio/channels/ClosedChannelException.java: Documentation added.
* java/nio/channels/ClosedSelectorException.java: New file.
Diffstat (limited to 'gnu/java/nio/ServerSocketChannelImpl.java')
| -rw-r--r-- | gnu/java/nio/ServerSocketChannelImpl.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gnu/java/nio/ServerSocketChannelImpl.java b/gnu/java/nio/ServerSocketChannelImpl.java index 975a6fc1a..b9ed41ed4 100644 --- a/gnu/java/nio/ServerSocketChannelImpl.java +++ b/gnu/java/nio/ServerSocketChannelImpl.java @@ -37,6 +37,7 @@ exception statement from your version. */ package gnu.java.nio; +import java.io.IOException; import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.SocketAddress; @@ -53,10 +54,8 @@ class ServerSocketChannelImpl extends ServerSocketChannel boolean connected = false; InetSocketAddress sa; -/* - private static native int NioSocketAccept (ServerSocketChannelImpl server, - SocketChannelImpl s); -*/ +// private static native int NioSocketAccept (ServerSocketChannelImpl server, +// SocketChannelImpl s); private static int NioSocketAccept (ServerSocketChannelImpl server, SocketChannelImpl s) @@ -68,6 +67,15 @@ class ServerSocketChannelImpl extends ServerSocketChannel { super (provider); fd = SocketChannelImpl.SocketCreate (); + + try + { + sock_object = new ServerSocket (); + } + catch (IOException e) + { + System.err.println ("ServerSocket could not be created."); + } } public void finalizer() @@ -91,7 +99,7 @@ class ServerSocketChannelImpl extends ServerSocketChannel fd = SocketChannelImpl.SocketCreate (); } - protected void implConfigureBlocking (boolean block) + protected void implConfigureBlocking (boolean block) { } |
