Top Description Methods
io.netty.channel.socket.oio

public Interface OioSocketChannelConfig

extends SocketChannelConfig
Known Direct Implementers
io.netty.channel.socket.oio.DefaultOioSocketChannelConfig
Annotations
@Deprecated
Imports
io.netty.buffer.ByteBufAllocator, io.netty.channel.ChannelConfig, .ChannelOption, .MessageSizeEstimator, .RecvByteBufAllocator, .WriteBufferWaterMark, io.netty.channel.socket.SocketChannelConfig

Deprecated

use NIO / EPOLL / KQUEUE transport.

A ChannelConfig for a OioSocketChannel.

Available options

In addition to the options provided by SocketChannelConfig, OioSocketChannelConfig allows the following options in the option map:
NameAssociated setter method
ChannelOption#SO_TIMEOUTsetSoTimeout(int)

Method Summary

Modifier and TypeMethod and Description
public int
getSoTimeout()

Returns the maximal time a operation on the underlying socket may block.

public OioSocketChannelConfig
setAllocator(ByteBufAllocator allocator)

Redeclares io.netty.channel.socket.SocketChannelConfig.setAllocator.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Set the ByteBufAllocator which is used for the channel to allocate buffers.
public OioSocketChannelConfig
setAllowHalfClosure(boolean allowHalfClosure)

Redeclares io.netty.channel.socket.SocketChannelConfig.setAllowHalfClosure.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets whether the channel should not close itself when its remote peer shuts down output to make the connection half-closed.
public OioSocketChannelConfig
setAutoClose(boolean autoClose)

Redeclares io.netty.channel.socket.SocketChannelConfig.setAutoClose.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets whether the Channel should be closed automatically and immediately on write failure.
public OioSocketChannelConfig
setAutoRead(boolean autoRead)

Redeclares io.netty.channel.socket.SocketChannelConfig.setAutoRead.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets if ChannelHandlerContext#read() will be invoked automatically so that a user application doesn't need to call it at all.
public OioSocketChannelConfig
setConnectTimeoutMillis(int
the connect timeout in milliseconds. 0 to disable.
connectTimeoutMillis
)

Redeclares io.netty.channel.socket.SocketChannelConfig.setConnectTimeoutMillis.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets the connect timeout of the channel in milliseconds.
public OioSocketChannelConfig
setKeepAlive(boolean keepAlive)

Redeclares io.netty.channel.socket.SocketChannelConfig.setKeepAlive.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets the StandardSocketOptions#SO_KEEPALIVE option.
public OioSocketChannelConfig
public OioSocketChannelConfig
setMessageSizeEstimator(MessageSizeEstimator estimator)

Redeclares io.netty.channel.socket.SocketChannelConfig.setMessageSizeEstimator.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Set the MessageSizeEstimator which is used for the channel to detect the size of a message.
public OioSocketChannelConfig
setPerformancePreferences(int connectionTime, int latency, int bandwidth)

Redeclares io.netty.channel.socket.SocketChannelConfig.setPerformancePreferences.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets the performance preferences as specified in Socket#setPerformancePreferences(int, int, int).
public OioSocketChannelConfig
setReceiveBufferSize(int receiveBufferSize)

Redeclares io.netty.channel.socket.SocketChannelConfig.setReceiveBufferSize.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets the StandardSocketOptions#SO_RCVBUF option.
public OioSocketChannelConfig
setRecvByteBufAllocator(RecvByteBufAllocator allocator)

Redeclares io.netty.channel.socket.SocketChannelConfig.setRecvByteBufAllocator.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Set the RecvByteBufAllocator which is used for the channel to allocate receive buffers.
public OioSocketChannelConfig
setReuseAddress(boolean reuseAddress)

Redeclares io.netty.channel.socket.SocketChannelConfig.setReuseAddress.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets the StandardSocketOptions#SO_REUSEADDR option.
public OioSocketChannelConfig
setSendBufferSize(int sendBufferSize)

Redeclares io.netty.channel.socket.SocketChannelConfig.setSendBufferSize.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets the StandardSocketOptions#SO_SNDBUF option.
public OioSocketChannelConfig
setSoLinger(int soLinger)

Redeclares io.netty.channel.socket.SocketChannelConfig.setSoLinger.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets the StandardSocketOptions#SO_LINGER option.
public OioSocketChannelConfig
setSoTimeout(int timeout)

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets the maximal time a operation on the underlying socket may block.
public OioSocketChannelConfig
setTcpNoDelay(boolean tcpNoDelay)

Redeclares io.netty.channel.socket.SocketChannelConfig.setTcpNoDelay.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets the StandardSocketOptions#TCP_NODELAY option.
public OioSocketChannelConfig
setTrafficClass(int trafficClass)

Redeclares io.netty.channel.socket.SocketChannelConfig.setTrafficClass.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets the StandardSocketOptions#IP_TOS option.
public OioSocketChannelConfig
setWriteBufferHighWaterMark(int writeBufferHighWaterMark)

Redeclares io.netty.channel.ChannelConfig.setWriteBufferHighWaterMark.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.

Sets the high water mark of the write buffer.

public OioSocketChannelConfig
setWriteBufferLowWaterMark(int writeBufferLowWaterMark)

Redeclares io.netty.channel.ChannelConfig.setWriteBufferLowWaterMark.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.

Sets the low water mark of the write buffer.

public OioSocketChannelConfig
setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)

Redeclares io.netty.channel.socket.SocketChannelConfig.setWriteBufferWaterMark.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Set the WriteBufferWaterMark which is used for setting the high and low water mark of the write buffer.
public OioSocketChannelConfig
setWriteSpinCount(int writeSpinCount)

Redeclares io.netty.channel.socket.SocketChannelConfig.setWriteSpinCount.

Deprecated as a consequence of OioSocketChannelConfig being deprecated.
Sets the maximum loop count for a write operation until WritableByteChannel#write(ByteBuffer) returns a non-zero value.
Inherited from io.netty.channel.socket.SocketChannelConfig:
getReceiveBufferSizegetSendBufferSizegetSoLingergetTrafficClassisKeepAliveisReuseAddressisTcpNoDelay

Method Detail

getSoTimeoutback to summary
public int getSoTimeout()

Returns the maximal time a operation on the underlying socket may block.

setAllocatorback to summary
public OioSocketChannelConfig setAllocator(ByteBufAllocator allocator)

Redeclares io.netty.channel.socket.SocketChannelConfig.setAllocator.

Doc from io.netty.channel.ChannelConfig.setAllocator.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Set the ByteBufAllocator which is used for the channel to allocate buffers.

Annotations
@Override
setAllowHalfClosureback to summary
public OioSocketChannelConfig setAllowHalfClosure(boolean allowHalfClosure)

Redeclares io.netty.channel.socket.SocketChannelConfig.setAllowHalfClosure.

Doc from io.netty.channel.socket.DuplexChannelConfig.setAllowHalfClosure.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets whether the channel should not close itself when its remote peer shuts down output to make the connection half-closed. If true the connection is not closed when the remote peer shuts down output. Instead, ChannelInboundHandler#userEventTriggered(ChannelHandlerContext, Object) is invoked with a ChannelInputShutdownEvent object. If false, the connection is closed automatically.

Annotations
@Override
setAutoCloseback to summary
public OioSocketChannelConfig setAutoClose(boolean autoClose)

Redeclares io.netty.channel.socket.SocketChannelConfig.setAutoClose.

Doc from io.netty.channel.ChannelConfig.setAutoClose.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets whether the Channel should be closed automatically and immediately on write failure. The default is true.

Annotations
@Override
setAutoReadback to summary
public OioSocketChannelConfig setAutoRead(boolean autoRead)

Redeclares io.netty.channel.socket.SocketChannelConfig.setAutoRead.

Doc from io.netty.channel.ChannelConfig.setAutoRead.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets if ChannelHandlerContext#read() will be invoked automatically so that a user application doesn't need to call it at all. The default value is true.

Annotations
@Override
setConnectTimeoutMillisback to summary
public OioSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)

Redeclares io.netty.channel.socket.SocketChannelConfig.setConnectTimeoutMillis.

Doc from io.netty.channel.ChannelConfig.setConnectTimeoutMillis.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the connect timeout of the channel in milliseconds. If the Channel does not support connect operation, this property is not used at all, and therefore will be ignored.

Parameters
connectTimeoutMillis:int

the connect timeout in milliseconds. 0 to disable.

Annotations
@Override
setKeepAliveback to summary
public OioSocketChannelConfig setKeepAlive(boolean keepAlive)

Redeclares io.netty.channel.socket.SocketChannelConfig.setKeepAlive.

Doc from io.netty.channel.socket.SocketChannelConfig.setKeepAlive.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the StandardSocketOptions#SO_KEEPALIVE option.

Annotations
@Override
setMaxMessagesPerReadback to summary
public OioSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)

Redeclares io.netty.channel.socket.SocketChannelConfig.setMaxMessagesPerRead.

Deprecated

Annotations
@Override
@Deprecated
setMessageSizeEstimatorback to summary
public OioSocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator)

Redeclares io.netty.channel.socket.SocketChannelConfig.setMessageSizeEstimator.

Doc from io.netty.channel.ChannelConfig.setMessageSizeEstimator.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Set the MessageSizeEstimator which is used for the channel to detect the size of a message.

Annotations
@Override
setPerformancePreferencesback to summary
public OioSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth)

Redeclares io.netty.channel.socket.SocketChannelConfig.setPerformancePreferences.

Doc from io.netty.channel.socket.SocketChannelConfig.setPerformancePreferences.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the performance preferences as specified in Socket#setPerformancePreferences(int, int, int).

Annotations
@Override
setReceiveBufferSizeback to summary
public OioSocketChannelConfig setReceiveBufferSize(int receiveBufferSize)

Redeclares io.netty.channel.socket.SocketChannelConfig.setReceiveBufferSize.

Doc from io.netty.channel.socket.SocketChannelConfig.setReceiveBufferSize.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the StandardSocketOptions#SO_RCVBUF option.

Annotations
@Override
setRecvByteBufAllocatorback to summary
public OioSocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator)

Redeclares io.netty.channel.socket.SocketChannelConfig.setRecvByteBufAllocator.

Doc from io.netty.channel.ChannelConfig.setRecvByteBufAllocator.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Set the RecvByteBufAllocator which is used for the channel to allocate receive buffers.

Annotations
@Override
setReuseAddressback to summary
public OioSocketChannelConfig setReuseAddress(boolean reuseAddress)

Redeclares io.netty.channel.socket.SocketChannelConfig.setReuseAddress.

Doc from io.netty.channel.socket.SocketChannelConfig.setReuseAddress.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the StandardSocketOptions#SO_REUSEADDR option.

Annotations
@Override
setSendBufferSizeback to summary
public OioSocketChannelConfig setSendBufferSize(int sendBufferSize)

Redeclares io.netty.channel.socket.SocketChannelConfig.setSendBufferSize.

Doc from io.netty.channel.socket.SocketChannelConfig.setSendBufferSize.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the StandardSocketOptions#SO_SNDBUF option.

Annotations
@Override
setSoLingerback to summary
public OioSocketChannelConfig setSoLinger(int soLinger)

Redeclares io.netty.channel.socket.SocketChannelConfig.setSoLinger.

Doc from io.netty.channel.socket.SocketChannelConfig.setSoLinger.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the StandardSocketOptions#SO_LINGER option.

Annotations
@Override
setSoTimeoutback to summary
public OioSocketChannelConfig setSoTimeout(int timeout)

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the maximal time a operation on the underlying socket may block.

setTcpNoDelayback to summary
public OioSocketChannelConfig setTcpNoDelay(boolean tcpNoDelay)

Redeclares io.netty.channel.socket.SocketChannelConfig.setTcpNoDelay.

Doc from io.netty.channel.socket.SocketChannelConfig.setTcpNoDelay.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the StandardSocketOptions#TCP_NODELAY option. Please note that the default value of this option is true unlike the operating system default (false). However, for some buggy platforms, such as Android, that shows erratic behavior with Nagle's algorithm disabled, the default value remains to be false.

Annotations
@Override
setTrafficClassback to summary
public OioSocketChannelConfig setTrafficClass(int trafficClass)

Redeclares io.netty.channel.socket.SocketChannelConfig.setTrafficClass.

Doc from io.netty.channel.socket.SocketChannelConfig.setTrafficClass.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the StandardSocketOptions#IP_TOS option.

Annotations
@Override
setWriteBufferHighWaterMarkback to summary
public OioSocketChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)

Redeclares io.netty.channel.ChannelConfig.setWriteBufferHighWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferHighWaterMark.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the high water mark of the write buffer. If the number of bytes queued in the write buffer exceeds this value, Channel#isWritable() will start to return false.

Annotations
@Override
setWriteBufferLowWaterMarkback to summary
public OioSocketChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)

Redeclares io.netty.channel.ChannelConfig.setWriteBufferLowWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferLowWaterMark.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the low water mark of the write buffer. Once the number of bytes queued in the write buffer exceeded the high water mark and then dropped down below this value, Channel#isWritable() will start to return true again.

Annotations
@Override
setWriteBufferWaterMarkback to summary
public OioSocketChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)

Redeclares io.netty.channel.socket.SocketChannelConfig.setWriteBufferWaterMark.

Doc from io.netty.channel.ChannelConfig.setWriteBufferWaterMark.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Set the WriteBufferWaterMark which is used for setting the high and low water mark of the write buffer.

Annotations
@Override
setWriteSpinCountback to summary
public OioSocketChannelConfig setWriteSpinCount(int writeSpinCount)

Redeclares io.netty.channel.socket.SocketChannelConfig.setWriteSpinCount.

Doc from io.netty.channel.ChannelConfig.setWriteSpinCount.

Deprecated

as a consequence of OioSocketChannelConfig being deprecated. See corresponding docs for further information.

Sets the maximum loop count for a write operation until WritableByteChannel#write(ByteBuffer) returns a non-zero value. It is similar to what a spin lock is used for in concurrency programming. It improves memory utilization and write throughput depending on the platform that JVM runs on. The default value is 16.

Annotations
@Override