summaryrefslogtreecommitdiff
path: root/gnu/java/nio/SocketChannelImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/java/nio/SocketChannelImpl.java')
-rw-r--r--gnu/java/nio/SocketChannelImpl.java10
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();