Package io.netty.channel.socket.nio
Class NioSocketChannel.NioSocketChannelConfig
java.lang.Object
io.netty.channel.DefaultChannelConfig
io.netty.channel.socket.DefaultSocketChannelConfig
io.netty.channel.socket.nio.NioSocketChannel.NioSocketChannelConfig
- All Implemented Interfaces:
ChannelConfig,DuplexChannelConfig,SocketChannelConfig
- Enclosing class:
NioSocketChannel
-
Field Summary
FieldsFields inherited from class io.netty.channel.socket.DefaultSocketChannelConfig
javaSocketFields inherited from class io.netty.channel.DefaultChannelConfig
channel -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateNioSocketChannelConfig(NioSocketChannel channel, Socket javaSocket) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidIs called onceDefaultChannelConfig.setAutoRead(boolean)is called withfalseandDefaultChannelConfig.isAutoRead()wastruebefore.private void(package private) int<T> TgetOption(ChannelOption<T> option) Return the value of the givenChannelOptionMap<ChannelOption<?>, Object> Return all setChannelOption's.private SocketChannel(package private) voidsetMaxBytesPerGatheringWrite(int maxBytesPerGatheringWrite) <T> booleansetOption(ChannelOption<T> option, T value) Sets a configuration property with the specified name and value.setSendBufferSize(int sendBufferSize) Sets theStandardSocketOptions.SO_SNDBUFoption.Methods inherited from class io.netty.channel.socket.DefaultSocketChannelConfig
getReceiveBufferSize, getSendBufferSize, getSoLinger, getTrafficClass, isAllowHalfClosure, isKeepAlive, isReuseAddress, isTcpNoDelay, setAllocator, setAllowHalfClosure, setAutoClose, setAutoRead, setConnectTimeoutMillis, setKeepAlive, setMaxMessagesPerRead, setMessageSizeEstimator, setPerformancePreferences, setReceiveBufferSize, setRecvByteBufAllocator, setReuseAddress, setSoLinger, setTcpNoDelay, setTrafficClass, setWriteBufferHighWaterMark, setWriteBufferLowWaterMark, setWriteBufferWaterMark, setWriteSpinCountMethods inherited from class io.netty.channel.DefaultChannelConfig
getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMaxMessagesPerWrite, getMessageSizeEstimator, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setMaxMessagesPerWrite, setOptions, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelConfig
getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setOptions
-
Field Details
-
maxBytesPerGatheringWrite
private volatile int maxBytesPerGatheringWrite
-
-
Constructor Details
-
NioSocketChannelConfig
-
-
Method Details
-
autoReadCleared
protected void autoReadCleared()Description copied from class:DefaultChannelConfigIs called onceDefaultChannelConfig.setAutoRead(boolean)is called withfalseandDefaultChannelConfig.isAutoRead()wastruebefore.- Overrides:
autoReadClearedin classDefaultChannelConfig
-
setSendBufferSize
Description copied from interface:SocketChannelConfigSets theStandardSocketOptions.SO_SNDBUFoption.- Specified by:
setSendBufferSizein interfaceSocketChannelConfig- Overrides:
setSendBufferSizein classDefaultSocketChannelConfig
-
setOption
Description copied from interface:ChannelConfigSets a configuration property with the specified name and value. To override this method properly, you must call the super class:public boolean setOption(ChannelOption<T> option, T value) { if (super.setOption(option, value)) { return true; } if (option.equals(additionalOption)) { .... return true; } return false; }- Specified by:
setOptionin interfaceChannelConfig- Overrides:
setOptionin classDefaultSocketChannelConfig- Returns:
trueif and only if the property has been set
-
getOption
Description copied from interface:ChannelConfigReturn the value of the givenChannelOption- Specified by:
getOptionin interfaceChannelConfig- Overrides:
getOptionin classDefaultSocketChannelConfig
-
getOptions
Description copied from interface:ChannelConfigReturn all setChannelOption's.- Specified by:
getOptionsin interfaceChannelConfig- Overrides:
getOptionsin classDefaultSocketChannelConfig
-
setMaxBytesPerGatheringWrite
void setMaxBytesPerGatheringWrite(int maxBytesPerGatheringWrite) -
getMaxBytesPerGatheringWrite
int getMaxBytesPerGatheringWrite() -
calculateMaxBytesPerGatheringWrite
private void calculateMaxBytesPerGatheringWrite() -
jdkChannel
-