forked from I2P_Developers/i2p.i2p
Initial implementation of read() timeout on I2PSocket. Let's see whether it
could solve duck's problems with dangling threads... (human)
This commit is contained in:
@@ -32,8 +32,22 @@ public interface I2PSocket {
|
||||
*/
|
||||
public OutputStream getOutputStream() throws IOException;
|
||||
|
||||
/**
|
||||
* How long we will wait blocked on a read() operation.
|
||||
*
|
||||
* @return milliseconds to wait, or -1 if we will wait indefinitely
|
||||
*/
|
||||
public long getReadTimeout();
|
||||
|
||||
/**
|
||||
* Define how long we will wait blocked on a read() operation (-1 will make
|
||||
* the socket wait forever).
|
||||
*
|
||||
*/
|
||||
public void setReadTimeout(long ms);
|
||||
|
||||
/**
|
||||
* Closes the socket if not closed yet
|
||||
*/
|
||||
public void close() throws IOException;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user