## net.i2p.client.streaming
Interface I2PSocketOptions

All Known Implementing Classes:
  I2PSocketOptionsImpl

public interface I2PSocketOptions

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

Field Summary
`static java.lang.String` `PROP_BUFFER_SIZE`
`static java.lang.String` `PROP_CONNECT_TIMEOUT`
`static java.lang.String` `PROP_READ_TIMEOUT`
`static java.lang.String` `PROP_WRITE_TIMEOUT`

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

    public static final java.lang.String PROP_BUFFER_SIZE

See Also:
  Constant Field Values

### PROP_CONNECT_TIMEOUT

    public static final java.lang.String PROP_CONNECT_TIMEOUT

See Also:
  Constant Field Values

### PROP_READ_TIMEOUT

    public static final java.lang.String PROP_READ_TIMEOUT

See Also:
  Constant Field Values

### PROP_WRITE_TIMEOUT

    public static final java.lang.String PROP_WRITE_TIMEOUT

See Also:
  Constant Field Values

Method Detail

### getConnectTimeout

    public 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

    public void setConnectTimeout(long ms)

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

### getReadTimeout

    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

### setReadTimeout

    public 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

### getMaxBufferSize

    public 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

    public 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)

### getWriteTimeout

    public 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.

### setWriteTimeout

    public 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.