forked from I2P_Developers/i2p.i2p
Streaming read timeout fixes:
i2ptunnel: - Better timeout handling when reading headers in HTTP server (improved fix for ticket #723) Enforce total header timeout with new readLine() - Prep for returning specific HTTP errors to client on request timeout and header errors, instead of just closing socket... further work to be in i2p.i2p.zzz.test2 branch Streaming: - Fix read timeout on input stream - was waiting too long, often twice as long as timeout, or more Enforce total timeout even when notify()ed - Fix read() returning 0 on read timeout instead of -1 (possible fix for ticket #335) This prevents passing partial headers to server on timeout - Fix javadocs for read timeout to match current behavior - Fix StandardSocket SoTimeout to account for differences with I2PSocket readTimeout - log tweaks
This commit is contained in:
@@ -37,22 +37,22 @@ public interface I2PSocketOptions {
|
||||
/**
|
||||
* What is the longest we'll block on the input stream while waiting
|
||||
* for more data. If this value is exceeded, the read() throws
|
||||
* InterruptedIOException
|
||||
* InterruptedIOException - FIXME doesn't really, returns -1 or 0 instead.
|
||||
*
|
||||
* WARNING: Default -1 (unlimited), which is probably not what you want.
|
||||
*
|
||||
* @return timeout in ms
|
||||
* @return timeout in ms, 0 for nonblocking, -1 for forever
|
||||
*/
|
||||
public long getReadTimeout();
|
||||
|
||||
/**
|
||||
* What is the longest we'll block on the input stream while waiting
|
||||
* for more data. If this value is exceeded, the read() throws
|
||||
* InterruptedIOException
|
||||
* InterruptedIOException - FIXME doesn't really, returns -1 or 0 instead.
|
||||
*
|
||||
* WARNING: Default -1 (unlimited), which is probably not what you want.
|
||||
*
|
||||
* @param ms timeout in ms
|
||||
* @param ms timeout in ms, 0 for nonblocking, -1 for forever
|
||||
*/
|
||||
public void setReadTimeout(long ms);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user