public enum Types
WriteSpinOptionallows users to configure the number of repetitions of a only partially successful write call before considering the
Channelnot writable. Setting this option to
0means that we only issue one write call and if that call does not write all the bytes, we consider the
public struct WriteSpinOption : ChannelOption
DatagramVectorReadMessageCountOptionallows users to configure the number of messages to attempt to read in a single syscall on a datagram
Channels have extremely high datagram throughput. This can occur when the single datagram socket is encapsulating many logical “connections” (e.g. with QUIC) or when the datagram socket is simply serving an enormous number of consumers (e.g. with a public-facing DNS server). In this case the overhead of one syscall per datagram is profoundly limiting. Using this
Channelto read multiple datagrams at once.
Note that simply increasing this number will not necessarily bring performance gains and may in fact cause data loss. Any increase to this should be matched by increasing the size of the buffers allocated by the
RecvByteBufferAllocator(as set by
ChannelOption.recvAllocator) proportionally. For example, to receive 10 messages at a time, set the size of the buffers allocated by the
RecvByteBufferAllocatorto at least 10x the size of the maximum datagram size you wish to receive.
Naturally, this option is only valid on datagram channels.
This option only works on the following platforms:
On all other platforms, setting it has no effect.
Set this option to 0 to disable vector reads and to use serial reads instead.See more
public struct DatagramVectorReadMessageCountOption : ChannelOption
WriteBufferWaterMarkOptionallows users to configure when a
Channelshould be marked as writable or not. Once the amount of bytes queued in a
Channels outbound buffer is larger than
WriteBufferWaterMark.highthe channel will be marked as non-writable and so
false. Once we were able to write some data out of the outbound buffer and the amount of bytes queued falls below
Channelwill become writable again. Once this happens
trueagain. These writability changes are also propagated through the
ChannelPipelineand so can be intercepted via
public struct WriteBufferWaterMarkOption : ChannelOption
AllowRemoteHalfClosureOptionallows users to configure whether the
Channelwill close itself when its remote peer shuts down its send stream, or whether it will remain open. If set to
false(the default), the
Channelwill be closed automatically if the remote peer shuts down its send stream. If set to true, the
Channelwill not be closed: instead, a
ChannelEvent.inboundCloseduser event will be sent on the
ChannelPipeline, and no more data will be received.
public struct AllowRemoteHalfClosureOption : ChannelOption