diff options
| author | Michael Koch <konqueror@gmx.de> | 2003-10-15 12:51:30 +0000 |
|---|---|---|
| committer | Michael Koch <konqueror@gmx.de> | 2003-10-15 12:51:30 +0000 |
| commit | 2096ba496342aa3318a3e7d40cb8d0732ba9ad67 (patch) | |
| tree | d02892e7f72d1366955cf983bce78d70a8ca4c0f /gnu/java/nio/SocketChannelImpl.java | |
| parent | 10e8cffabc2540577202a4663f4737fc18cbb80f (diff) | |
| download | classpath-2096ba496342aa3318a3e7d40cb8d0732ba9ad67.tar.gz | |
2003-10-15 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/NIOSocket.java
(setChannel): Initialize impl.
* gnu/java/nio/ServerSocketChannelImpl.java
(ServerSocketChannelImpl): Made class public final.
(serverSocket): Made it a NIOServerSocket.
(getNativeFD): New method.
(implConfigureBlocking): Set socket timeout.
(accept): Rewritten.
* gnu/java/nio/SelectorImpl.java
(register): Use ServerSocketChannelSelectionKey for server socket
channels, removed comments.
* gnu/java/nio/SocketChannelImpl.java
(impl): New member variable.
(SocketChannelImpl): Initialize impl.
(getImpl): New method.
* gnu/java/nio/NIOServerSocket.java,
gnu/java/nio/ServerSocketChannelSelectionKey.java: New files.
* gnu/java/nio/Makefile.am (EXTRA_DIST):
Added NIOServerSocket.java and ServerSocketChannelSelectionKey.java.
Diffstat (limited to 'gnu/java/nio/SocketChannelImpl.java')
| -rw-r--r-- | gnu/java/nio/SocketChannelImpl.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/java/nio/SocketChannelImpl.java b/gnu/java/nio/SocketChannelImpl.java index 589296f51..4281e6758 100644 --- a/gnu/java/nio/SocketChannelImpl.java +++ b/gnu/java/nio/SocketChannelImpl.java @@ -63,6 +63,7 @@ import gnu.classpath.Configuration; public final class SocketChannelImpl extends SocketChannel { + private PlainSocketImpl impl; private NIOSocket socket; private boolean blocking = true; private boolean connected = false; @@ -72,7 +73,8 @@ public final class SocketChannelImpl extends SocketChannel throws IOException { super (provider); - socket = new NIOSocket (new PlainSocketImpl(), this); + impl = new PlainSocketImpl(); + socket = new NIOSocket (impl, this); } SocketChannelImpl (SelectorProvider provider, @@ -80,6 +82,7 @@ public final class SocketChannelImpl extends SocketChannel throws IOException { super (provider); + this.impl = socket.getImpl(); this.socket = socket; this.connected = socket.isConnected(); } @@ -98,6 +101,11 @@ public final class SocketChannelImpl extends SocketChannel } } + PlainSocketImpl getImpl() + { + return impl; + } + int getNativeFD() { return socket.getImpl().getNativeFD(); |
