public interface SocketChannelConfig extends ChannelConfig
ChannelConfig
for a SocketChannel
.
ChannelConfig
,
SocketChannelConfig
allows the following options in the option map:
Name | Associated setter method |
---|---|
"keepAlive" | setKeepAlive(boolean) |
"reuseAddress" | setReuseAddress(boolean) |
"soLinger" | setSoLinger(int) |
"tcpNoDelay" | setTcpNoDelay(boolean) |
"receiveBufferSize" | setReceiveBufferSize(int) |
"sendBufferSize" | setSendBufferSize(int) |
"trafficClass" | setTrafficClass(int) |
Modifier and Type | Method and Description |
---|---|
int |
getReceiveBufferSize()
Gets the
SO_RCVBUF option. |
int |
getSendBufferSize()
Gets the
SO_SNDBUF option. |
int |
getSoLinger()
Gets the
SO_LINGER option. |
int |
getTrafficClass()
Gets the traffic class.
|
boolean |
isKeepAlive()
Gets the
SO_KEEPALIVE option. |
boolean |
isReuseAddress()
Gets the
SO_REUSEADDR option. |
boolean |
isTcpNoDelay()
Gets the
SO_TCPNODELAY option. |
void |
setKeepAlive(boolean keepAlive)
Sets the
SO_KEEPALIVE option. |
void |
setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
Sets the performance preferences as specified in
Socket.setPerformancePreferences(int, int, int) . |
void |
setReceiveBufferSize(int receiveBufferSize)
Gets the
SO_RCVBUF option. |
void |
setReuseAddress(boolean reuseAddress)
Sets the
SO_REUSEADDR option. |
void |
setSendBufferSize(int sendBufferSize)
Sets the
SO_SNDBUF option. |
void |
setSoLinger(int soLinger)
Sets the
SO_LINGER option. |
void |
setTcpNoDelay(boolean tcpNoDelay)
Sets the
SO_TCPNODELAY option. |
void |
setTrafficClass(int trafficClass)
Sets the traffic class as specified in
Socket.setTrafficClass(int) . |
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOption, setOptions, setPipelineFactory
boolean isTcpNoDelay()
SO_TCPNODELAY
option.void setTcpNoDelay(boolean tcpNoDelay)
SO_TCPNODELAY
option.int getSoLinger()
SO_LINGER
option.void setSoLinger(int soLinger)
SO_LINGER
option.int getSendBufferSize()
SO_SNDBUF
option.void setSendBufferSize(int sendBufferSize)
SO_SNDBUF
option.int getReceiveBufferSize()
SO_RCVBUF
option.void setReceiveBufferSize(int receiveBufferSize)
SO_RCVBUF
option.boolean isKeepAlive()
SO_KEEPALIVE
option.void setKeepAlive(boolean keepAlive)
SO_KEEPALIVE
option.int getTrafficClass()
void setTrafficClass(int trafficClass)
Socket.setTrafficClass(int)
.boolean isReuseAddress()
SO_REUSEADDR
option.void setReuseAddress(boolean reuseAddress)
SO_REUSEADDR
option.void setPerformancePreferences(int connectionTime, int latency, int bandwidth)
Socket.setPerformancePreferences(int, int, int)
.Copyright © 2008-2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.