forked from I2P_Developers/i2p.i2p
Added more complete javadocs to ministreaming and cleaned up overrides so
the code is JDK5 compliant. There remains some unchecked warnings, but these aren't important at this juncture.
This commit is contained in:
@@ -5,9 +5,13 @@ package net.i2p.client.streaming;
|
||||
*
|
||||
*/
|
||||
public interface I2PSocketOptions {
|
||||
/** How much data will we accept that hasn't been written out yet. */
|
||||
public static final String PROP_BUFFER_SIZE = "i2p.streaming.bufferSize";
|
||||
/** How long wait for the ACK from a SYN, in milliseconds. */
|
||||
public static final String PROP_CONNECT_TIMEOUT = "i2p.streaming.connectTimeout";
|
||||
/** How long to block on read. */
|
||||
public static final String PROP_READ_TIMEOUT = "i2p.streaming.readTimeout";
|
||||
/** How long to block on write/flush */
|
||||
public static final String PROP_WRITE_TIMEOUT = "i2p.streaming.writeTimeout";
|
||||
|
||||
/**
|
||||
@@ -20,6 +24,7 @@ public interface I2PSocketOptions {
|
||||
/**
|
||||
* Define how long we will wait for the ACK from a SYN, in milliseconds.
|
||||
*
|
||||
* @param ms timeout in ms
|
||||
*/
|
||||
public void setConnectTimeout(long ms);
|
||||
|
||||
@@ -27,6 +32,7 @@ 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
|
||||
* @return timeout in ms
|
||||
*/
|
||||
public long getReadTimeout();
|
||||
|
||||
@@ -34,6 +40,7 @@ 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
|
||||
* @param ms timeout in ms
|
||||
*/
|
||||
public void setReadTimeout(long ms);
|
||||
|
||||
@@ -53,6 +60,7 @@ public interface I2PSocketOptions {
|
||||
* either some data is removed or the connection is closed. If this is
|
||||
* less than or equal to zero, there is no limit (warning: can eat ram)
|
||||
*
|
||||
* @param numBytes How much data will we accept that hasn't been written out yet.
|
||||
*/
|
||||
public void setMaxBufferSize(int numBytes);
|
||||
|
||||
@@ -61,6 +69,7 @@ public interface I2PSocketOptions {
|
||||
* for the data to flush. If this value is exceeded, the write() throws
|
||||
* InterruptedIOException. If this is less than or equal to zero, there
|
||||
* is no timeout.
|
||||
* @return wait time to block on the output stream while waiting for the data to flush.
|
||||
*/
|
||||
public long getWriteTimeout();
|
||||
|
||||
@@ -69,6 +78,7 @@ public interface I2PSocketOptions {
|
||||
* for the data to flush. If this value is exceeded, the write() throws
|
||||
* InterruptedIOException. If this is less than or equal to zero, there
|
||||
* is no timeout.
|
||||
* @param ms wait time to block on the output stream while waiting for the data to flush.
|
||||
*/
|
||||
public void setWriteTimeout(long ms);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user