I2PSocketOptions
ConnectionOptions
class I2PSocketOptionsImpl extends java.lang.Object implements I2PSocketOptions
修飾子とタイプ | フィールド | 説明 |
---|---|---|
static int |
DEFAULT_BUFFER_SIZE |
|
static int |
DEFAULT_CONNECT_TIMEOUT |
|
static int |
DEFAULT_WRITE_TIMEOUT |
PROP_BUFFER_SIZE, PROP_CONNECT_TIMEOUT, PROP_READ_TIMEOUT, PROP_WRITE_TIMEOUT
コンストラクタ | 説明 |
---|---|
I2PSocketOptionsImpl() |
Sets max buffer size, connect timeout, read timeout, and write timeout
from System properties.
|
I2PSocketOptionsImpl(java.util.Properties opts) |
Sets max buffer size, connect timeout, read timeout, and write timeout
from properties.
|
I2PSocketOptionsImpl(I2PSocketOptions opts) |
Initializes from System properties then copies over all options.
|
修飾子とタイプ | メソッド | 説明 |
---|---|---|
long |
getConnectTimeout() |
How long we will wait for the ACK from a SYN, in milliseconds.
|
static double |
getDouble(java.util.Properties opts,
java.lang.String name,
double defaultVal) |
Not part of the API, not for external use.
|
protected static int |
getInt(java.util.Properties opts,
java.lang.String name,
int defaultVal) |
|
int |
getLocalPort() |
The local port.
|
int |
getMaxBufferSize() |
How much data will we accept that hasn't been written out yet.
|
int |
getPort() |
The remote port.
|
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.
|
protected void |
init(java.util.Properties opts) |
Sets max buffer size, connect timeout, read timeout, and write timeout
from properties.
|
void |
setConnectTimeout(long ms) |
Define how long we will wait for the ACK from a SYN, in milliseconds.
|
void |
setLocalPort(int port) |
The local port.
|
void |
setMaxBufferSize(int numBytes) |
How much data will we accept that hasn't been written out yet.
|
void |
setPort(int port) |
The remote port.
|
void |
setProperties(java.util.Properties opts) |
Sets max buffer size, connect timeout, read timeout, and write timeout
from properties.
|
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.
|
public static final int DEFAULT_BUFFER_SIZE
public static final int DEFAULT_WRITE_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUT
public I2PSocketOptionsImpl()
public I2PSocketOptionsImpl(I2PSocketOptions opts)
opts
- may be nullpublic I2PSocketOptionsImpl(java.util.Properties opts)
opts
- may be nullpublic void setProperties(java.util.Properties opts)
opts
- may be nullprotected void init(java.util.Properties opts)
protected static int getInt(java.util.Properties opts, java.lang.String name, int defaultVal)
public static double getDouble(java.util.Properties opts, java.lang.String name, double defaultVal)
public long getConnectTimeout()
getConnectTimeout
インタフェース内 I2PSocketOptions
public void setConnectTimeout(long ms)
setConnectTimeout
インタフェース内 I2PSocketOptions
ms
- timeout in mspublic long getReadTimeout()
getReadTimeout
インタフェース内 I2PSocketOptions
public void setReadTimeout(long ms)
setReadTimeout
インタフェース内 I2PSocketOptions
ms
- timeout in ms, 0 for nonblocking, -1 for foreverpublic int getMaxBufferSize()
getMaxBufferSize
インタフェース内 I2PSocketOptions
public void setMaxBufferSize(int numBytes)
setMaxBufferSize
インタフェース内 I2PSocketOptions
numBytes
- How much data will we accept that hasn't been written out yet.public long getWriteTimeout()
getWriteTimeout
インタフェース内 I2PSocketOptions
public void setWriteTimeout(long ms)
setWriteTimeout
インタフェース内 I2PSocketOptions
ms
- wait time to block on the output stream while waiting for the data to flush.public int getPort()
getPort
インタフェース内 I2PSocketOptions
public void setPort(int port)
setPort
インタフェース内 I2PSocketOptions
port
- 0 - 65535public int getLocalPort()
getLocalPort
インタフェース内 I2PSocketOptions
public void setLocalPort(int port)
setLocalPort
インタフェース内 I2PSocketOptions
port
- 0 - 65535