public final class EpollSocketChannelConfig extends EpollChannelConfig implements io.netty.channel.socket.SocketChannelConfig
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getOption(io.netty.channel.ChannelOption<T> option) |
Map<io.netty.channel.ChannelOption<?>,Object> |
getOptions() |
int |
getReceiveBufferSize() |
int |
getSendBufferSize() |
int |
getSoBusyPoll()
Get the
SO_BUSY_POLL option on the socket. |
int |
getSoLinger() |
int |
getTcpKeepCnt()
Get the
TCP_KEEPCNT option on the socket. |
int |
getTcpKeepIdle()
Get the
TCP_KEEPIDLE option on the socket. |
int |
getTcpKeepIntvl()
Get the
TCP_KEEPINTVL option on the socket. |
long |
getTcpNotSentLowAt()
Get the
TCP_NOTSENT_LOWAT option on the socket. |
int |
getTcpUserTimeout()
Get the
TCP_USER_TIMEOUT option on the socket. |
int |
getTrafficClass() |
boolean |
isAllowHalfClosure() |
boolean |
isIpBindAddressNoPort()
Returns
true if the IP_BIND_ADDRESS_NO_PORT option is set. |
boolean |
isIpTransparent()
|
boolean |
isKeepAlive() |
boolean |
isReuseAddress() |
boolean |
isTcpCork()
Get the
TCP_CORK option on the socket. |
boolean |
isTcpFastOpenConnect()
Returns
true if TCP fast open is enabled, false otherwise. |
boolean |
isTcpNoDelay() |
boolean |
isTcpQuickAck()
|
EpollSocketChannelConfig |
setAllocator(io.netty.buffer.ByteBufAllocator allocator) |
EpollSocketChannelConfig |
setAllowHalfClosure(boolean allowHalfClosure) |
EpollSocketChannelConfig |
setAutoClose(boolean autoClose) |
EpollSocketChannelConfig |
setAutoRead(boolean autoRead) |
EpollSocketChannelConfig |
setConnectTimeoutMillis(int connectTimeoutMillis) |
EpollSocketChannelConfig |
setEpollMode(EpollMode mode)
Set the
EpollMode used. |
EpollSocketChannelConfig |
setIpBindAddressNoPort(boolean ipBindAddressNoPort)
Set the IP_BIND_ADDRESS_NO_PORT option on the underlying Channel.
|
EpollSocketChannelConfig |
setIpTransparent(boolean transparent)
|
EpollSocketChannelConfig |
setKeepAlive(boolean keepAlive) |
EpollSocketChannelConfig |
setMaxMessagesPerRead(int maxMessagesPerRead)
Deprecated.
|
EpollSocketChannelConfig |
setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator) |
<T> boolean |
setOption(io.netty.channel.ChannelOption<T> option,
T value) |
EpollSocketChannelConfig |
setPerformancePreferences(int connectionTime,
int latency,
int bandwidth) |
EpollSocketChannelConfig |
setReceiveBufferSize(int receiveBufferSize) |
EpollSocketChannelConfig |
setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator) |
EpollSocketChannelConfig |
setReuseAddress(boolean reuseAddress) |
EpollSocketChannelConfig |
setSendBufferSize(int sendBufferSize) |
EpollSocketChannelConfig |
setSoBusyPoll(int loopMicros)
Set the
SO_BUSY_POLL option on the socket. |
EpollSocketChannelConfig |
setSoLinger(int soLinger) |
EpollSocketChannelConfig |
setTcpCork(boolean tcpCork)
Set the
TCP_CORK option on the socket. |
EpollSocketChannelConfig |
setTcpFastOpenConnect(boolean fastOpenConnect)
Enables client TCP fast open.
|
EpollSocketChannelConfig |
setTcpKeepCnt(int probes)
Set the
TCP_KEEPCNT option on the socket. |
EpollSocketChannelConfig |
setTcpKeepCntl(int probes)
Deprecated.
|
EpollSocketChannelConfig |
setTcpKeepIdle(int seconds)
Set the
TCP_KEEPIDLE option on the socket. |
EpollSocketChannelConfig |
setTcpKeepIntvl(int seconds)
Set the
TCP_KEEPINTVL option on the socket. |
EpollSocketChannelConfig |
setTcpMd5Sig(Map<InetAddress,byte[]> keys)
Set the
TCP_MD5SIG option on the socket. |
EpollSocketChannelConfig |
setTcpNoDelay(boolean tcpNoDelay) |
EpollSocketChannelConfig |
setTcpNotSentLowAt(long tcpNotSentLowAt)
Set the
TCP_NOTSENT_LOWAT option on the socket. |
EpollSocketChannelConfig |
setTcpQuickAck(boolean quickAck)
Set the
TCP_QUICKACK option on the socket. |
EpollSocketChannelConfig |
setTcpUserTimeout(int milliseconds)
Set the
TCP_USER_TIMEOUT option on the socket. |
EpollSocketChannelConfig |
setTrafficClass(int trafficClass) |
EpollSocketChannelConfig |
setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
Deprecated.
|
EpollSocketChannelConfig |
setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
Deprecated.
|
EpollSocketChannelConfig |
setWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark) |
EpollSocketChannelConfig |
setWriteSpinCount(int writeSpinCount) |
autoReadCleared, getEpollMode, getMaxBytesPerGatheringWrite, setMaxBytesPerGatheringWrite, socketgetAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMaxMessagesPerWrite, getMessageSizeEstimator, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setMaxMessagesPerWrite, setOptions, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setOptionspublic Map<io.netty.channel.ChannelOption<?>,Object> getOptions()
getOptions in interface io.netty.channel.ChannelConfiggetOptions in class EpollChannelConfigpublic <T> T getOption(io.netty.channel.ChannelOption<T> option)
getOption in interface io.netty.channel.ChannelConfiggetOption in class EpollChannelConfigpublic <T> boolean setOption(io.netty.channel.ChannelOption<T> option,
T value)
setOption in interface io.netty.channel.ChannelConfigsetOption in class EpollChannelConfigpublic int getReceiveBufferSize()
getReceiveBufferSize in interface io.netty.channel.socket.SocketChannelConfigpublic int getSendBufferSize()
getSendBufferSize in interface io.netty.channel.socket.SocketChannelConfigpublic int getSoLinger()
getSoLinger in interface io.netty.channel.socket.SocketChannelConfigpublic int getTrafficClass()
getTrafficClass in interface io.netty.channel.socket.SocketChannelConfigpublic boolean isKeepAlive()
isKeepAlive in interface io.netty.channel.socket.SocketChannelConfigpublic boolean isReuseAddress()
isReuseAddress in interface io.netty.channel.socket.SocketChannelConfigpublic boolean isTcpNoDelay()
isTcpNoDelay in interface io.netty.channel.socket.SocketChannelConfigpublic boolean isTcpCork()
TCP_CORK option on the socket. See man 7 tcp for more details.public int getSoBusyPoll()
SO_BUSY_POLL option on the socket. See man 7 tcp for more details.public long getTcpNotSentLowAt()
TCP_NOTSENT_LOWAT option on the socket. See man 7 tcp for more details.public int getTcpKeepIdle()
TCP_KEEPIDLE option on the socket. See man 7 tcp for more details.public int getTcpKeepIntvl()
TCP_KEEPINTVL option on the socket. See man 7 tcp for more details.public int getTcpKeepCnt()
TCP_KEEPCNT option on the socket. See man 7 tcp for more details.public int getTcpUserTimeout()
TCP_USER_TIMEOUT option on the socket. See man 7 tcp for more details.public EpollSocketChannelConfig setKeepAlive(boolean keepAlive)
setKeepAlive in interface io.netty.channel.socket.SocketChannelConfigpublic EpollSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth)
setPerformancePreferences in interface io.netty.channel.socket.SocketChannelConfigpublic EpollSocketChannelConfig setReceiveBufferSize(int receiveBufferSize)
setReceiveBufferSize in interface io.netty.channel.socket.SocketChannelConfigpublic EpollSocketChannelConfig setReuseAddress(boolean reuseAddress)
setReuseAddress in interface io.netty.channel.socket.SocketChannelConfigpublic EpollSocketChannelConfig setSendBufferSize(int sendBufferSize)
setSendBufferSize in interface io.netty.channel.socket.SocketChannelConfigpublic EpollSocketChannelConfig setSoLinger(int soLinger)
setSoLinger in interface io.netty.channel.socket.SocketChannelConfigpublic EpollSocketChannelConfig setTcpNoDelay(boolean tcpNoDelay)
setTcpNoDelay in interface io.netty.channel.socket.SocketChannelConfigpublic EpollSocketChannelConfig setTcpCork(boolean tcpCork)
TCP_CORK option on the socket. See man 7 tcp for more details.public EpollSocketChannelConfig setSoBusyPoll(int loopMicros)
SO_BUSY_POLL option on the socket. See man 7 tcp for more details.public EpollSocketChannelConfig setTcpNotSentLowAt(long tcpNotSentLowAt)
TCP_NOTSENT_LOWAT option on the socket. See man 7 tcp for more details.tcpNotSentLowAt - is a uint32_tpublic EpollSocketChannelConfig setTrafficClass(int trafficClass)
setTrafficClass in interface io.netty.channel.socket.SocketChannelConfigpublic EpollSocketChannelConfig setTcpKeepIdle(int seconds)
TCP_KEEPIDLE option on the socket. See man 7 tcp for more details.public EpollSocketChannelConfig setTcpKeepIntvl(int seconds)
TCP_KEEPINTVL option on the socket. See man 7 tcp for more details.@Deprecated public EpollSocketChannelConfig setTcpKeepCntl(int probes)
setTcpKeepCnt(int)public EpollSocketChannelConfig setTcpKeepCnt(int probes)
TCP_KEEPCNT option on the socket. See man 7 tcp for more details.public EpollSocketChannelConfig setTcpUserTimeout(int milliseconds)
TCP_USER_TIMEOUT option on the socket. See man 7 tcp for more details.public boolean isIpBindAddressNoPort()
true if the IP_BIND_ADDRESS_NO_PORT option is set.public EpollSocketChannelConfig setIpBindAddressNoPort(boolean ipBindAddressNoPort)
AbstractChannel.bind(java.net.SocketAddress) to have
any affect.public boolean isIpTransparent()
public EpollSocketChannelConfig setIpTransparent(boolean transparent)
public EpollSocketChannelConfig setTcpMd5Sig(Map<InetAddress,byte[]> keys)
TCP_MD5SIG option on the socket. See linux/tcp.h for more details.
Keys can only be set on, not read to prevent a potential leak, as they are confidential.
Allowing them being read would mean anyone with access to the channel could get them.public EpollSocketChannelConfig setTcpQuickAck(boolean quickAck)
TCP_QUICKACK option on the socket.
See TCP_QUICKACK
for more details.public boolean isTcpQuickAck()
public EpollSocketChannelConfig setTcpFastOpenConnect(boolean fastOpenConnect)
TCP_FASTOPEN_CONNECT normally
requires Linux kernel 4.11 or later, so instead we use the traditional fast open
client socket mechanics that work with kernel 3.6 and later. See this
LWN article for more info.public boolean isTcpFastOpenConnect()
true if TCP fast open is enabled, false otherwise.public boolean isAllowHalfClosure()
isAllowHalfClosure in interface io.netty.channel.socket.DuplexChannelConfigpublic EpollSocketChannelConfig setAllowHalfClosure(boolean allowHalfClosure)
setAllowHalfClosure in interface io.netty.channel.socket.DuplexChannelConfigsetAllowHalfClosure in interface io.netty.channel.socket.SocketChannelConfigpublic EpollSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)
setConnectTimeoutMillis in interface io.netty.channel.ChannelConfigsetConnectTimeoutMillis in interface io.netty.channel.socket.SocketChannelConfigsetConnectTimeoutMillis in class EpollChannelConfig@Deprecated public EpollSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)
setMaxMessagesPerRead in interface io.netty.channel.ChannelConfigsetMaxMessagesPerRead in interface io.netty.channel.socket.DuplexChannelConfigsetMaxMessagesPerRead in interface io.netty.channel.socket.SocketChannelConfigsetMaxMessagesPerRead in class EpollChannelConfigpublic EpollSocketChannelConfig setWriteSpinCount(int writeSpinCount)
setWriteSpinCount in interface io.netty.channel.ChannelConfigsetWriteSpinCount in interface io.netty.channel.socket.DuplexChannelConfigsetWriteSpinCount in interface io.netty.channel.socket.SocketChannelConfigsetWriteSpinCount in class EpollChannelConfigpublic EpollSocketChannelConfig setAllocator(io.netty.buffer.ByteBufAllocator allocator)
setAllocator in interface io.netty.channel.ChannelConfigsetAllocator in interface io.netty.channel.socket.DuplexChannelConfigsetAllocator in interface io.netty.channel.socket.SocketChannelConfigsetAllocator in class EpollChannelConfigpublic EpollSocketChannelConfig setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator)
setRecvByteBufAllocator in interface io.netty.channel.ChannelConfigsetRecvByteBufAllocator in interface io.netty.channel.socket.DuplexChannelConfigsetRecvByteBufAllocator in interface io.netty.channel.socket.SocketChannelConfigsetRecvByteBufAllocator in class EpollChannelConfigpublic EpollSocketChannelConfig setAutoRead(boolean autoRead)
setAutoRead in interface io.netty.channel.ChannelConfigsetAutoRead in interface io.netty.channel.socket.DuplexChannelConfigsetAutoRead in interface io.netty.channel.socket.SocketChannelConfigsetAutoRead in class EpollChannelConfigpublic EpollSocketChannelConfig setAutoClose(boolean autoClose)
setAutoClose in interface io.netty.channel.ChannelConfigsetAutoClose in interface io.netty.channel.socket.DuplexChannelConfigsetAutoClose in interface io.netty.channel.socket.SocketChannelConfigsetAutoClose in class io.netty.channel.DefaultChannelConfig@Deprecated public EpollSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
setWriteBufferHighWaterMark in interface io.netty.channel.ChannelConfigsetWriteBufferHighWaterMark in class EpollChannelConfig@Deprecated public EpollSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
setWriteBufferLowWaterMark in interface io.netty.channel.ChannelConfigsetWriteBufferLowWaterMark in class EpollChannelConfigpublic EpollSocketChannelConfig setWriteBufferWaterMark(io.netty.channel.WriteBufferWaterMark writeBufferWaterMark)
setWriteBufferWaterMark in interface io.netty.channel.ChannelConfigsetWriteBufferWaterMark in interface io.netty.channel.socket.DuplexChannelConfigsetWriteBufferWaterMark in interface io.netty.channel.socket.SocketChannelConfigsetWriteBufferWaterMark in class EpollChannelConfigpublic EpollSocketChannelConfig setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator)
setMessageSizeEstimator in interface io.netty.channel.ChannelConfigsetMessageSizeEstimator in interface io.netty.channel.socket.DuplexChannelConfigsetMessageSizeEstimator in interface io.netty.channel.socket.SocketChannelConfigsetMessageSizeEstimator in class EpollChannelConfigpublic EpollSocketChannelConfig setEpollMode(EpollMode mode)
EpollChannelConfigEpollMode used. Default is
EpollMode.EDGE_TRIGGERED. If you want to use DefaultChannelConfig.isAutoRead() false or
DefaultChannelConfig.getMaxMessagesPerRead() and have an accurate behaviour you should use
EpollMode.LEVEL_TRIGGERED.
Be aware this config setting can only be adjusted before the channel was registered.setEpollMode in class EpollChannelConfigCopyright © 2008–2025 The Netty Project. All rights reserved.