Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.i2p.client.streaming
Interface I2PSocketOptions

All Known Implementing Classes:
  ConnectionOptions, I2PSocketOptionsImpl

    public interface I2PSocketOptions

Define the configuration for streaming and verifying data on the socket.

Field Summary
`static String` | `PROP_BUFFER_SIZE` How much data will we accept that hasn't been written out yet.
`static String` | `PROP_CONNECT_TIMEOUT` How long wait for the ACK from a SYN, in milliseconds.
`static String` | `PROP_READ_TIMEOUT` How long to block on read.
`static String` | `PROP_WRITE_TIMEOUT` How long to block on write/flush

Method Summary
`long` | `getConnectTimeout()` How long we will wait for the ACK from a SYN, in milliseconds.
`int` | `getMaxBufferSize()` How much data will we accept that hasn't been written out yet.
`long` | `getReadTimeout()` What is the longest we'll block on the input stream while waiting for more data.
`long` | `getWriteTimeout()` What is the longest we'll block on the output stream while waiting for the data to flush.
`void` | `setConnectTimeout(long ms)` Define how long we will wait for the ACK from a SYN, in milliseconds.
`void` | `setMaxBufferSize(int numBytes)` How much data will we accept that hasn't been written out yet.
`void` | `setReadTimeout(long ms)` What is the longest we'll block on the input stream while waiting for more data.
`void` | `setWriteTimeout(long ms)` What is the longest we'll block on the output stream while waiting for the data to flush.

Field Detail

### PROP_BUFFER_SIZE

    static final String PROP_BUFFER_SIZE

  How much data will we accept that hasn't been written out yet.

  See Also:
    Constant Field Values

### PROP_CONNECT_TIMEOUT

    static final String PROP_CONNECT_TIMEOUT

  How long wait for the ACK from a SYN, in milliseconds.

  See Also:
    Constant Field Values

### PROP_READ_TIMEOUT

    static final String PROP_READ_TIMEOUT

  How long to block on read.

  See Also:
    Constant Field Values

### PROP_WRITE_TIMEOUT

    static final String PROP_WRITE_TIMEOUT

  How long to block on write/flush

  See Also:
    Constant Field Values

Method Detail

### getConnectTimeout

    long getConnectTimeout()

  How long we will wait for the ACK from a SYN, in milliseconds.

  Returns:
    milliseconds to wait, or -1 if we will wait indefinitely

### setConnectTimeout

    void setConnectTimeout(long ms)

  Define how long we will wait for the ACK from a SYN, in milliseconds.

  Parameters:
    `ms` - timeout in ms

### getReadTimeout

    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

  Returns:
    timeout in ms

### setReadTimeout

    void setReadTimeout(long ms)

  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

  Parameters:
    `ms` - timeout in ms

### getMaxBufferSize

    int getMaxBufferSize()

  How much data will we accept that hasn't been written out yet. After this amount has been exceeded, subsequent .write calls will block until 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)

  Returns:
    buffer size limit, in bytes

### setMaxBufferSize

    void setMaxBufferSize(int numBytes)

  How much data will we accept that hasn't been written out yet. After this amount has been exceeded, subsequent .write calls will block until 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)

  Parameters:
    `numBytes` - How much data will we accept that hasn't been written out yet.

### getWriteTimeout

    long getWriteTimeout()

  What is the longest we'll block on the output stream while waiting 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.

  Returns:
    wait time to block on the output stream while waiting for the data to flush.

### setWriteTimeout

    void setWriteTimeout(long ms)

  What is the longest we'll block on the output stream while waiting 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.

  Parameters:
    `ms` - wait time to block on the output stream while waiting for the data to flush.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD