net.i2p.i2ptunnel
Class I2PTunnelServer
java.lang.Object
net.i2p.i2ptunnel.I2PTunnelTask
net.i2p.i2ptunnel.I2PTunnelServer
- All Implemented Interfaces:
- java.lang.Runnable, EventDispatcher
- Direct Known Subclasses:
- I2PTunnelHTTPServer
public class I2PTunnelServer
- extends I2PTunnelTask
- implements java.lang.Runnable
Constructor Summary |
I2PTunnelServer(java.net.InetAddress host,
int port,
java.io.File privkey,
java.lang.String privkeyname,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
|
I2PTunnelServer(java.net.InetAddress host,
int port,
java.io.InputStream privData,
java.lang.String privkeyname,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
|
I2PTunnelServer(java.net.InetAddress host,
int port,
java.lang.String privData,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
|
Methods inherited from class net.i2p.i2ptunnel.I2PTunnelTask |
attachEventDispatcher, detachEventDispatcher, disconnected, errorOccurred, getEventDispatcher, getEvents, getEventValue, getId, getTunnel, ignoreEvents, isOpen, notifyEvent, reportAbuse, routerDisconnected, setId, setName, setTunnel, toString, unIgnoreEvents, waitEventValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
sockMgr
protected I2PSocketManager sockMgr
i2pss
protected I2PServerSocket i2pss
slock
protected java.lang.Object slock
remoteHost
protected java.net.InetAddress remoteHost
remotePort
protected int remotePort
readTimeout
protected long readTimeout
- default timeout to 3 minutes - override if desired
I2PTunnelServer
public I2PTunnelServer(java.net.InetAddress host,
int port,
java.lang.String privData,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
I2PTunnelServer
public I2PTunnelServer(java.net.InetAddress host,
int port,
java.io.File privkey,
java.lang.String privkeyname,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
I2PTunnelServer
public I2PTunnelServer(java.net.InetAddress host,
int port,
java.io.InputStream privData,
java.lang.String privkeyname,
Logging l,
EventDispatcher notifyThis,
I2PTunnel tunnel)
startRunning
public void startRunning()
- Start running the I2PTunnelServer.
setReadTimeout
public void setReadTimeout(long ms)
- Set the read idle timeout for newly-created connections (in
milliseconds). After this time expires without data being reached from
the I2P network, the connection itself will be closed.
getReadTimeout
public long getReadTimeout()
- Get the read idle timeout for newly-created connections (in
milliseconds).
- Returns:
- The read timeout used for connections
close
public boolean close(boolean forced)
- Specified by:
close
in class I2PTunnelTask
getHandlerCount
protected int getHandlerCount()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
shouldUsePool
public boolean shouldUsePool()
blockingHandle
protected void blockingHandle(I2PSocket socket)