Merged gcj-eclipse branch to trunk.
From-SVN: r120621
This commit is contained in:
@@ -48,30 +48,33 @@ import java.nio.channels.SocketChannel;
|
||||
*/
|
||||
public final class NIOSocket extends Socket
|
||||
{
|
||||
private PlainSocketImpl impl;
|
||||
private SocketChannelImpl channel;
|
||||
|
||||
protected NIOSocket (PlainSocketImpl impl, SocketChannelImpl channel)
|
||||
protected NIOSocket (SocketChannelImpl channel)
|
||||
throws IOException
|
||||
{
|
||||
super (impl);
|
||||
this.impl = impl;
|
||||
super (new NIOSocketImpl(channel));
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
public final PlainSocketImpl getPlainSocketImpl()
|
||||
{
|
||||
return impl;
|
||||
}
|
||||
//public final PlainSocketImpl getPlainSocketImpl()
|
||||
//{
|
||||
// return impl;
|
||||
//}
|
||||
|
||||
final void setChannel (SocketChannelImpl channel)
|
||||
{
|
||||
this.impl = channel.getPlainSocketImpl();
|
||||
this.channel = channel;
|
||||
}
|
||||
//final void setChannel (SocketChannelImpl channel)
|
||||
//{
|
||||
// this.impl = channel.getPlainSocketImpl();
|
||||
// this.channel = channel;
|
||||
//}
|
||||
|
||||
public final SocketChannel getChannel()
|
||||
{
|
||||
return channel;
|
||||
}
|
||||
|
||||
public boolean isConnected()
|
||||
{
|
||||
return channel.isConnected();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user