public interface SocketSessionConfig extends IoSessionConfig
IoSessionConfig
for socket transport type.限定符和类型 | 方法和说明 |
---|---|
int |
getReceiveBufferSize() |
int |
getSendBufferSize() |
int |
getSoLinger()
Please note that enabling SO_LINGER in Java NIO can result
in platform-dependent behavior and unexpected blocking of I/O thread.
|
int |
getTrafficClass() |
boolean |
isKeepAlive() |
boolean |
isOobInline() |
boolean |
isReuseAddress() |
boolean |
isTcpNoDelay() |
void |
setKeepAlive(boolean keepAlive) |
void |
setOobInline(boolean oobInline) |
void |
setReceiveBufferSize(int receiveBufferSize) |
void |
setReuseAddress(boolean reuseAddress) |
void |
setSendBufferSize(int sendBufferSize) |
void |
setSoLinger(int soLinger)
Please note that enabling SO_LINGER in Java NIO can result
in platform-dependent behavior and unexpected blocking of I/O thread.
|
void |
setTcpNoDelay(boolean tcpNoDelay) |
void |
setTrafficClass(int trafficClass) |
getBothIdleTime, getBothIdleTimeInMillis, getIdleTime, getIdleTimeInMillis, getMaxReadBufferSize, getMinReadBufferSize, getReadBufferSize, getReaderIdleTime, getReaderIdleTimeInMillis, getThroughputCalculationInterval, getThroughputCalculationIntervalInMillis, getWriterIdleTime, getWriterIdleTimeInMillis, getWriteTimeout, getWriteTimeoutInMillis, isUseReadOperation, setAll, setBothIdleTime, setIdleTime, setMaxReadBufferSize, setMinReadBufferSize, setReadBufferSize, setReaderIdleTime, setThroughputCalculationInterval, setUseReadOperation, setWriterIdleTime, setWriteTimeout
boolean isReuseAddress()
Socket.getReuseAddress()
void setReuseAddress(boolean reuseAddress)
reuseAddress
- Tells if SO_REUSEADDR is enabled or disabledSocket.setReuseAddress(boolean)
int getReceiveBufferSize()
Socket.getReceiveBufferSize()
void setReceiveBufferSize(int receiveBufferSize)
receiveBufferSize
- The size of the receive bufferSocket.setReceiveBufferSize(int)
int getSendBufferSize()
Socket.getSendBufferSize()
void setSendBufferSize(int sendBufferSize)
sendBufferSize
- The size of the send bufferSocket.setSendBufferSize(int)
int getTrafficClass()
Socket.getTrafficClass()
void setTrafficClass(int trafficClass)
trafficClass
- The traffic class to set, one of IPTOS_LOWCOST (0x02)
IPTOS_RELIABILITY (0x04), IPTOS_THROUGHPUT (0x08) or IPTOS_LOWDELAY (0x10)Socket.setTrafficClass(int)
boolean isKeepAlive()
Socket.getKeepAlive()
void setKeepAlive(boolean keepAlive)
keepAlive
- if SO_KEEPALIVE is to be enabledSocket.setKeepAlive(boolean)
boolean isOobInline()
Socket.getOOBInline()
void setOobInline(boolean oobInline)
oobInline
- if SO_OOBINLINE is to be enabledSocket.setOOBInline(boolean)
int getSoLinger()
Socket.getSoLinger()
,
Sun Bug Databasevoid setSoLinger(int soLinger)
soLinger
- Please specify a negative value to disable SO_LINGER.Socket.setSoLinger(boolean, int)
,
Sun Bug Databaseboolean isTcpNoDelay()
Socket.getTcpNoDelay()
void setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay
- true if TCP_NODELAY is to be enabledSocket.setTcpNoDelay(boolean)