public class SocketOptions extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CONNECT_TIMEOUT_MILLIS |
| Constructor and Description |
|---|
SocketOptions()
Creates a new
SocketOptions instance with default values. |
| Modifier and Type | Method and Description |
|---|---|
int |
getConnectTimeoutMillis()
Returns the connection timeout in milliseconds.
|
Boolean |
getKeepAlive() |
Integer |
getReceiveBufferSize() |
Boolean |
getReuseAddress() |
Integer |
getSendBufferSize() |
Integer |
getSoLinger() |
Boolean |
getTcpNoDelay() |
SocketOptions |
setConnectTimeoutMillis(int connectTimeoutMillis)
Sets the connection timeout in milliseconds.
|
SocketOptions |
setKeepAlive(boolean keepAlive) |
SocketOptions |
setReceiveBufferSize(int receiveBufferSize) |
SocketOptions |
setReuseAddress(boolean reuseAddress) |
SocketOptions |
setSendBufferSize(int sendBufferSize) |
SocketOptions |
setSoLinger(int soLinger) |
SocketOptions |
setTcpNoDelay(boolean tcpNoDelay) |
public static final int DEFAULT_CONNECT_TIMEOUT_MILLIS
public SocketOptions()
SocketOptions instance with default values.public int getConnectTimeoutMillis()
public SocketOptions setConnectTimeoutMillis(int connectTimeoutMillis)
connectTimeoutMillis - the timeout to setpublic Boolean getKeepAlive()
public SocketOptions setKeepAlive(boolean keepAlive)
public Boolean getReuseAddress()
public SocketOptions setReuseAddress(boolean reuseAddress)
public Integer getSoLinger()
public SocketOptions setSoLinger(int soLinger)
public Boolean getTcpNoDelay()
public SocketOptions setTcpNoDelay(boolean tcpNoDelay)
public Integer getReceiveBufferSize()
public SocketOptions setReceiveBufferSize(int receiveBufferSize)
public Integer getSendBufferSize()
public SocketOptions setSendBufferSize(int sendBufferSize)
Copyright © 2013. All Rights Reserved.