forked from I2P_Developers/i2p.i2p
as added by 'dream' in late 2011. Testing couldn't have happened, as they don't work and can't ever work as designed. Channels must have underlying file descriptors unless you implement your own Selector and that would probably require JNI. See http://zzz.i2p/topics/1229 for details. Also http://stackoverflow.com/questions/911780/how-do-i-define-my-own-selectablechannel
27 lines
807 B
Java
27 lines
807 B
Java
package net.i2p.client.streaming;
|
|
|
|
import net.i2p.I2PException;
|
|
import java.net.ConnectException;
|
|
import java.nio.channels.SelectableChannel;
|
|
|
|
/**
|
|
* As this does not (yet) extend ServerSocketChannel it cannot be returned by StandardServerSocket.getChannel(),
|
|
* until we implement an I2P SocketAddress class.
|
|
*
|
|
* Warning, this interface and implementation is preliminary and subject to change without notice.
|
|
*
|
|
* Unimplemented, unlikely to ever be implemented.
|
|
*
|
|
* @since 0.8.11
|
|
*/
|
|
public abstract class AcceptingChannel extends SelectableChannel {
|
|
|
|
protected abstract I2PSocket accept() throws I2PException, ConnectException;
|
|
|
|
protected final I2PSocketManager _socketManager;
|
|
|
|
protected AcceptingChannel(I2PSocketManager manager) {
|
|
this._socketManager = manager;
|
|
}
|
|
}
|