forked from I2P_Developers/i2p.i2p
Added an "accepting" channel for I2PServerSockets that is really low brow, but should work for now. Compiles, runs.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package net.i2p.client.streaming;
|
||||
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.client.streaming.I2PSocketManager;
|
||||
import net.i2p.I2PException;
|
||||
import java.net.ConnectException;
|
||||
import java.nio.channels.SelectableChannel;
|
||||
|
||||
public abstract class AcceptingChannel extends SelectableChannel {
|
||||
abstract I2PSocket accept() throws I2PException, ConnectException;
|
||||
I2PSocketManager _socketManager;
|
||||
AcceptingChannel(I2PSocketManager manager) {
|
||||
this._socketManager = manager;
|
||||
}
|
||||
}
|
@@ -31,6 +31,8 @@ public interface I2PServerSocket {
|
||||
*/
|
||||
public I2PSocket accept() throws I2PException, ConnectException, SocketTimeoutException;
|
||||
|
||||
public AcceptingChannel getChannel();
|
||||
|
||||
/**
|
||||
* Set Sock Option accept timeout
|
||||
* @param x timeout in ms
|
||||
|
Reference in New Issue
Block a user