net.i2p.i2ptunnel
public class I2PTunnelServer extends I2PTunnelTask implements Runnable
Modifier and Type | Field and Description |
---|---|
protected static long |
__serverId |
protected Log |
_log |
protected boolean |
bidir |
protected I2PServerSocket |
i2pss |
protected int |
localPort |
protected long |
readTimeout
default timeout to 3 minutes - override if desired
|
protected InetAddress |
remoteHost |
protected int |
remotePort |
protected Object |
slock |
protected I2PSocketManager |
sockMgr |
protected I2PTunnelTask |
task |
open
Constructor and Description |
---|
I2PTunnelServer(InetAddress host,
int port,
File privkey,
String privkeyname,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel) |
I2PTunnelServer(InetAddress host,
int port,
InputStream privData,
String privkeyname,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel) |
I2PTunnelServer(InetAddress host,
int port,
String privData,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel) |
Modifier and Type | Method and Description |
---|---|
protected void |
blockingHandle(I2PSocket socket) |
boolean |
close(boolean forced) |
protected int |
getHandlerCount() |
long |
getReadTimeout()
Get the read idle timeout for newly-created connections (in
milliseconds).
|
void |
run()
If usePool is set, this starts the executor pool.
|
void |
setReadTimeout(long ms)
Set the read idle timeout for newly-created connections (in
milliseconds).
|
boolean |
shouldUsePool() |
void |
startRunning()
Start running the I2PTunnelServer.
|
attachEventDispatcher, detachEventDispatcher, disconnected, errorOccurred, getEventDispatcher, getEvents, getEventValue, getId, getTunnel, ignoreEvents, isOpen, notifyEvent, reportAbuse, routerDisconnected, setId, setName, setTunnel, toString, unIgnoreEvents, waitEventValue
protected final Log _log
protected I2PSocketManager sockMgr
protected I2PServerSocket i2pss
protected final Object slock
protected InetAddress remoteHost
protected int remotePort
protected long readTimeout
protected static volatile long __serverId
protected I2PTunnelTask task
protected boolean bidir
protected int localPort
public I2PTunnelServer(InetAddress host, int port, String privData, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
IllegalArgumentException
- if the I2CP configuration is b0rked so
badly that we cant create a socketManagerpublic I2PTunnelServer(InetAddress host, int port, File privkey, String privkeyname, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
IllegalArgumentException
- if the I2CP configuration is b0rked so
badly that we cant create a socketManagerpublic I2PTunnelServer(InetAddress host, int port, InputStream privData, String privkeyname, Logging l, EventDispatcher notifyThis, I2PTunnel tunnel)
IllegalArgumentException
- if the I2CP configuration is b0rked so
badly that we cant create a socketManagerpublic void startRunning()
public void setReadTimeout(long ms)
public long getReadTimeout()
public boolean close(boolean forced)
close
in class I2PTunnelTask
protected int getHandlerCount()
public void run()
public boolean shouldUsePool()
protected void blockingHandle(I2PSocket socket)