Package net.i2p.i2ptunnel
Class I2PTunnelHTTPClientRunner
java.lang.Object
java.lang.Thread
net.i2p.util.I2PThread
net.i2p.util.I2PAppThread
net.i2p.i2ptunnel.I2PTunnelRunner
net.i2p.i2ptunnel.I2PTunnelHTTPClientRunner
- All Implemented Interfaces:
Runnable
,I2PSocket.SocketErrorListener
Override the response with a stream filtering the HTTP headers
received. Specifically, this makes sure we get Connection: close,
so the browser knows they really shouldn't try to use persistent
connections. The HTTP server *should* already be setting this,
since the HTTP headers sent by the browser specify Connection: close,
and the server should echo it. However, both broken and malicious
servers could ignore that, potentially confusing the user.
Warning - not maintained as a stable API for external use.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.i2p.i2ptunnel.I2PTunnelRunner
I2PTunnelRunner.FailCallback, I2PTunnelRunner.SuccessCallback
Nested classes/interfaces inherited from class net.i2p.util.I2PThread
I2PThread.OOMEventListener
Nested classes/interfaces inherited from class java.lang.Thread
Thread.BuilderPREVIEW, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class net.i2p.i2ptunnel.I2PTunnelRunner
_log, MAX_PACKET_SIZE, NETWORK_BUFFER_SIZE
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorDescriptionI2PTunnelHTTPClientRunner
(Socket s, I2PSocket i2ps, Object slock, byte[] initialI2PData, List<I2PSocket> sockList, I2PTunnelRunner.FailCallback onFail) Does NOT start itself. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
close
(OutputStream out, InputStream in, OutputStream i2pout, InputStream i2pin, Socket s, I2PSocket i2ps, Thread t1, Thread t2) Why is this overridden? Why flush in super but not here? Why do things in different order than in super?protected OutputStream
Only call once!Methods inherited from class net.i2p.i2ptunnel.I2PTunnelRunner
errorOccurred, getLastActivityOn, getSocketIn, getStartedOn, isFinished, run, setSuccessCallback
Methods inherited from class net.i2p.util.I2PAppThread
addOOMEventThreadListener, fireOOM, removeOOMEventThreadListener
Methods inherited from class net.i2p.util.I2PThread
addOOMEventListener, removeOOMEventListener, start
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, startVirtualThread, stop, suspend, threadId, toString, yield
-
Constructor Details
-
Method Details
-
getSocketOut
Only call once!- Overrides:
getSocketOut
in classI2PTunnelRunner
- Throws:
IOException
-
close
protected void close(OutputStream out, InputStream in, OutputStream i2pout, InputStream i2pin, Socket s, I2PSocket i2ps, Thread t1, Thread t2) throws InterruptedException Why is this overridden? Why flush in super but not here? Why do things in different order than in super?- Overrides:
close
in classI2PTunnelRunner
- Parameters:
out
- may be nullin
- may be nulli2pout
- may be nulli2pin
- may be nullt1
- may be nullt2
- may be null- Throws:
InterruptedException
-