Package org.jboss.netty.channel.socket
Interface SocketChannelConfig
- All Superinterfaces:
ChannelConfig
- All Known Subinterfaces:
NioSocketChannelConfig
- All Known Implementing Classes:
DefaultNioSocketChannelConfig,DefaultSocketChannelConfig,HttpTunnelingSocketChannelConfig
A
ChannelConfig for a SocketChannel.
Available options
In addition to the options provided byChannelConfig,
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) |
-
Method Summary
Modifier and TypeMethodDescriptionintGets theStandardSocketOptions.SO_RCVBUFoption.intGets theStandardSocketOptions.SO_SNDBUFoption.intGets theStandardSocketOptions.SO_LINGERoption.intGets theStandardSocketOptions.IP_TOSoption.booleanGets theStandardSocketOptions.SO_KEEPALIVEoption.booleanGets theStandardSocketOptions.SO_REUSEADDRoption.booleanGets theStandardSocketOptions.TCP_NODELAYoption.voidsetKeepAlive(boolean keepAlive) Sets theStandardSocketOptions.SO_KEEPALIVEoption.voidsetPerformancePreferences(int connectionTime, int latency, int bandwidth) Sets the performance preferences as specified inSocket.setPerformancePreferences(int, int, int).voidsetReceiveBufferSize(int receiveBufferSize) Sets theStandardSocketOptions.SO_RCVBUFoption.voidsetReuseAddress(boolean reuseAddress) Sets theStandardSocketOptions.SO_REUSEADDRoption.voidsetSendBufferSize(int sendBufferSize) Sets theStandardSocketOptions.SO_SNDBUFoption.voidsetSoLinger(int soLinger) Sets theStandardSocketOptions.SO_LINGERoption.voidsetTcpNoDelay(boolean tcpNoDelay) Sets theStandardSocketOptions.TCP_NODELAYoption.voidsetTrafficClass(int trafficClass) Sets theStandardSocketOptions.IP_TOSoption.Methods inherited from interface org.jboss.netty.channel.ChannelConfig
getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOption, setOptions, setPipelineFactory
-
Method Details
-
isTcpNoDelay
boolean isTcpNoDelay()Gets theStandardSocketOptions.TCP_NODELAYoption. -
setTcpNoDelay
void setTcpNoDelay(boolean tcpNoDelay) Sets theStandardSocketOptions.TCP_NODELAYoption. -
getSoLinger
int getSoLinger()Gets theStandardSocketOptions.SO_LINGERoption. -
setSoLinger
void setSoLinger(int soLinger) Sets theStandardSocketOptions.SO_LINGERoption. -
getSendBufferSize
int getSendBufferSize()Gets theStandardSocketOptions.SO_SNDBUFoption. -
setSendBufferSize
void setSendBufferSize(int sendBufferSize) Sets theStandardSocketOptions.SO_SNDBUFoption. -
getReceiveBufferSize
int getReceiveBufferSize()Gets theStandardSocketOptions.SO_RCVBUFoption. -
setReceiveBufferSize
void setReceiveBufferSize(int receiveBufferSize) Sets theStandardSocketOptions.SO_RCVBUFoption. -
isKeepAlive
boolean isKeepAlive()Gets theStandardSocketOptions.SO_KEEPALIVEoption. -
setKeepAlive
void setKeepAlive(boolean keepAlive) Sets theStandardSocketOptions.SO_KEEPALIVEoption. -
getTrafficClass
int getTrafficClass()Gets theStandardSocketOptions.IP_TOSoption. -
setTrafficClass
void setTrafficClass(int trafficClass) Sets theStandardSocketOptions.IP_TOSoption. -
isReuseAddress
boolean isReuseAddress()Gets theStandardSocketOptions.SO_REUSEADDRoption. -
setReuseAddress
void setReuseAddress(boolean reuseAddress) Sets theStandardSocketOptions.SO_REUSEADDRoption. -
setPerformancePreferences
void setPerformancePreferences(int connectionTime, int latency, int bandwidth) Sets the performance preferences as specified inSocket.setPerformancePreferences(int, int, int).
-