I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit d3999991 authored by dream's avatar dream
Browse files

merge of '4f86a13e5f3de7eb4aae8a1f0f3402e46f262ca2'

     and 'ecd077c360b4af5597166def49e62d6a82e57937'
parents f1ae06ab 00b9864d
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ package net.i2p.client.streaming;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.channels.SelectableChannel;
import net.i2p.data.Destination;
......@@ -34,6 +35,8 @@ public interface I2PSocket {
*/
public OutputStream getOutputStream() throws IOException;
public SelectableChannel getChannel() throws IOException;
/**
* @return socket's configuration
*/
......
......@@ -3,6 +3,7 @@ package net.i2p.client.streaming;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.channels.SelectableChannel;
import net.i2p.client.I2PSession;
import net.i2p.data.Destination;
......@@ -66,6 +67,10 @@ class I2PSocketFull implements I2PSocket {
else
return null;
}
public SelectableChannel getChannel() {
return new MessageChannel(this);
}
/**
* Warning, may return null instead of throwing IOE,
......
......@@ -71,7 +71,7 @@ class StandardSocket extends Socket {
*/
@Override
public SocketChannel getChannel() {
return null;
return _socket.getChannel();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment