net.i2p.i2ptunnel
public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErrorListener
I2PThread.OOMEventListener
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
finished |
(package private) Object |
finishLock |
(package private) byte[] |
initialI2PData |
(package private) byte[] |
initialSocketData |
(package private) static int |
MAX_PACKET_SIZE
max bytes streamed in a packet - smaller ones might be filled
up to this size.
|
(package private) static int |
NETWORK_BUFFER_SIZE |
(package private) HashMap |
ostreams |
(package private) Object |
slock |
(package private) HashMap |
sockets |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
I2PTunnelRunner(Socket s,
I2PSocket i2ps,
Object slock,
byte[] initialI2PData,
byte[] initialSocketData,
List sockList) |
I2PTunnelRunner(Socket s,
I2PSocket i2ps,
Object slock,
byte[] initialI2PData,
byte[] initialSocketData,
List sockList,
Runnable onTimeout) |
I2PTunnelRunner(Socket s,
I2PSocket i2ps,
Object slock,
byte[] initialI2PData,
List sockList) |
I2PTunnelRunner(Socket s,
I2PSocket i2ps,
Object slock,
byte[] initialI2PData,
List sockList,
Runnable onTimeout) |
Modifier and Type | Method and Description |
---|---|
protected void |
close(OutputStream out,
InputStream in,
OutputStream i2pout,
InputStream i2pin,
Socket s,
I2PSocket i2ps,
Thread t1,
Thread t2) |
void |
errorOccurred()
An error occurred communicating with the peer.
|
long |
getLastActivityOn()
When was the last data for this runner sent or received?
|
protected InputStream |
getSocketIn() |
protected OutputStream |
getSocketOut() |
long |
getStartedOn()
When this runner started up transferring data
|
boolean |
isFinished()
have we closed at least one (if not both) of the streams
[aka we're done running the streams]?
|
void |
run() |
addOOMEventThreadListener, fireOOM, removeOOMEventThreadListener
addOOMEventListener, finalize, main, removeOOMEventListener
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
static int MAX_PACKET_SIZE
static final int NETWORK_BUFFER_SIZE
final Object slock
final Object finishLock
boolean finished
HashMap ostreams
HashMap sockets
byte[] initialI2PData
byte[] initialSocketData
public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, List sockList)
public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, byte[] initialSocketData, List sockList)
public I2PTunnelRunner(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, List sockList, Runnable onTimeout)
public boolean isFinished()
public long getLastActivityOn()
public long getStartedOn()
protected InputStream getSocketIn() throws IOException
IOException
protected OutputStream getSocketOut() throws IOException
IOException
protected void close(OutputStream out, InputStream in, OutputStream i2pout, InputStream i2pin, Socket s, I2PSocket i2ps, Thread t1, Thread t2) throws InterruptedException, IOException
InterruptedException
IOException
public void errorOccurred()
I2PSocket.SocketErrorListener
errorOccurred
in interface I2PSocket.SocketErrorListener