Modifier and Type | Class and Description |
---|---|
static class |
SocketConfig.Builder |
Modifier and Type | Field and Description |
---|---|
private int |
backlogSize |
static SocketConfig |
DEFAULT |
private int |
rcvBufSize |
private int |
sndBufSize |
private boolean |
soKeepAlive |
private int |
soLinger |
private boolean |
soReuseAddress |
private int |
soTimeout |
private boolean |
tcpNoDelay |
Constructor and Description |
---|
SocketConfig(int soTimeout,
boolean soReuseAddress,
int soLinger,
boolean soKeepAlive,
boolean tcpNoDelay,
int sndBufSize,
int rcvBufSize,
int backlogSize) |
Modifier and Type | Method and Description |
---|---|
protected SocketConfig |
clone() |
static SocketConfig.Builder |
copy(SocketConfig config) |
static SocketConfig.Builder |
custom() |
int |
getBacklogSize()
Determines the maximum queue length for incoming connection indications
(a request to connect) also known as server socket backlog.
|
int |
getRcvBufSize()
Determines the default value of the
SocketOptions.SO_RCVBUF parameter
for newly created sockets. |
int |
getSndBufSize()
Determines the default value of the
SocketOptions.SO_SNDBUF parameter
for newly created sockets. |
int |
getSoLinger()
Determines the default value of the
SocketOptions.SO_LINGER parameter
for newly created sockets. |
int |
getSoTimeout()
Determines the default socket timeout value for non-blocking I/O operations.
|
boolean |
isSoKeepAlive()
Determines the default value of the
SocketOptions.SO_KEEPALIVE parameter
for newly created sockets. |
boolean |
isSoReuseAddress()
Determines the default value of the
SocketOptions.SO_REUSEADDR parameter
for newly created sockets. |
boolean |
isTcpNoDelay()
Determines the default value of the
SocketOptions.TCP_NODELAY parameter
for newly created sockets. |
String |
toString() |
public static final SocketConfig DEFAULT
private final int soTimeout
private final boolean soReuseAddress
private final int soLinger
private final boolean soKeepAlive
private final boolean tcpNoDelay
private final int sndBufSize
private final int rcvBufSize
private final int backlogSize
SocketConfig(int soTimeout, boolean soReuseAddress, int soLinger, boolean soKeepAlive, boolean tcpNoDelay, int sndBufSize, int rcvBufSize, int backlogSize)
public int getSoTimeout()
Default: 0
(no timeout)
SocketOptions.SO_TIMEOUT
public boolean isSoReuseAddress()
SocketOptions.SO_REUSEADDR
parameter
for newly created sockets.
Default: false
SocketOptions.SO_REUSEADDR
parameter.SocketOptions.SO_REUSEADDR
public int getSoLinger()
SocketOptions.SO_LINGER
parameter
for newly created sockets.
Default: -1
SocketOptions.SO_LINGER
parameter.SocketOptions.SO_LINGER
public boolean isSoKeepAlive()
SocketOptions.SO_KEEPALIVE
parameter
for newly created sockets.
Default: -1
SocketOptions.SO_KEEPALIVE
parameter.SocketOptions.SO_KEEPALIVE
public boolean isTcpNoDelay()
SocketOptions.TCP_NODELAY
parameter
for newly created sockets.
Default: false
SocketOptions.TCP_NODELAY
parameter.SocketOptions.TCP_NODELAY
public int getSndBufSize()
SocketOptions.SO_SNDBUF
parameter
for newly created sockets.
Default: 0
(system default)
SocketOptions.SO_SNDBUF
parameter.SocketOptions.SO_SNDBUF
public int getRcvBufSize()
SocketOptions.SO_RCVBUF
parameter
for newly created sockets.
Default: 0
(system default)
SocketOptions.SO_RCVBUF
parameter.SocketOptions.SO_RCVBUF
public int getBacklogSize()
Default: 0
(system default)
protected SocketConfig clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public static SocketConfig.Builder custom()
public static SocketConfig.Builder copy(SocketConfig config)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses