Top Description Inners Fields Constructors Methods
io.netty5.channel.epoll

public final Class EpollSocketChannel

extends AbstractEpollChannel<EpollServerSocketChannel>
implements SocketChannel
Class Inheritance
All Implemented Interfaces
io.netty5.channel.socket.SocketChannel, io.netty5.channel.Channel, io.netty5.channel.IoHandle, java.lang.Comparable, io.netty5.channel.ChannelOutboundInvoker, io.netty5.util.concurrent.FuturePromiseFactory, io.netty5.util.AttributeMap
Imports
io.netty5.buffer.Buffer, .BufferAllocator, io.netty5.channel.AdaptiveReadHandleFactory, .ChannelException, .ChannelOption, .ChannelShutdownDirection, .DefaultFileRegion, .EventLoop, .FileRegion, .WriteHandleFactory, io.netty5.channel.socket.SocketChannel, .SocketChannelWriteHandleFactory, .SocketProtocolFamily, io.netty5.channel.unix.DomainSocketReadMode, .FileDescriptor, .IntegerUnixChannelOption, .IovArray, .PeerCredentials, .RawUnixChannelOption, .SocketWritableByteChannel, .UnixChannel, .UnixChannelOption, .UnixChannelUtil, io.netty5.util.Resource, io.netty5.util.concurrent.Future, .GlobalEventExecutor, io.netty5.util.internal.StringUtil, java.io.IOException, java.net.InetAddress, .ProtocolFamily, .SocketAddress, java.nio.ByteBuffer, java.nio.channels.NotYetConnectedException, .WritableByteChannel, java.util.Collection, .Collections, .Map, .Set, java.util.concurrent.Executor

SocketChannel implementation that uses linux EPOLL Edge-Triggered Mode for maximal performance.

Available options

In addition to the options provided by SocketChannel and UnixChannel, EpollSocketChannel allows the following options in the option map:
ChannelOption INET INET6 UNIX
IntegerUnixChannelOptionXXX
RawUnixChannelOptionXXX
EpollChannelOption#TCP_CORKXX-
EpollChannelOption#TCP_NOTSENT_LOWATXX-
EpollChannelOption#TCP_KEEPCNTXX-
EpollChannelOption#TCP_KEEPIDLEXX-
EpollChannelOption#TCP_KEEPINTVLXX-
EpollChannelOption#TCP_MD5SIGXX-
EpollChannelOption#TCP_QUICKACKXX-
EpollChannelOption#TCP_INFOXX-
ChannelOption#TCP_FASTOPEN_CONNECTXX-
EpollChannelOption#IP_TRANSPARENTXX-
EpollChannelOption#SO_BUSY_POLLXX-
UnixChannelOption#SO_PEERCREDX
UnixChannelOption#DOMAIN_SOCKET_READ_MODEX

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private WritableByteChannel
private static final String
private volatile DomainSocketReadMode
private static final Set<ChannelOption<?>>
private static final Set<ChannelOption<?>>
private volatile boolean
private volatile Collection<InetAddress>
Inherited from io.netty5.channel.epoll.AbstractEpollChannel:
activesocket

Constructor Summary

AccessConstructor and Description
public
public
EpollSocketChannel(EventLoop eventLoop, ProtocolFamily protocolFamily)

public
EpollSocketChannel(EventLoop eventLoop, int fd, ProtocolFamily family)

private
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected boolean
protected void
doShutdown(ChannelShutdownDirection
the direction to shut down.
direction
)

Implements abstract io.netty5.channel.AbstractChannel.doShutdown.

Shutdown one direction of the Channel.
private void

Returns:

if we should continue with writing more messages.
doWriteMultiple
(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink
the WriteSink used to track write results.
writeSink
)

Attempt to write multiple Buffer objects.

protected void
doWriteNow(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink
the WriteSink that must be completed with the write progress. WriteSink#complete(long, long, int, boolean) or WriteSink#complete(long, Throwable, boolean) must be called exactly once before this method returns non-exceptional.
writeSink
)

Implements abstract io.netty5.channel.AbstractChannel.doWriteNow.

Called in a loop when writes should be performed until this method returns false or there are no more messages to write.
private void

Returns:

if we should continue with writing more messages.
doWriteSingle
(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink
the WriteSink used to track write results.
writeSink
)

Attempt to write a single object.

private AbstractEpollChannel.ReadState
protected AbstractEpollChannel.ReadState
private AbstractEpollChannel.ReadState
protected Object
filterOutboundMessage(Object
the message to filter / convert.
msg
)

Overrides io.netty5.channel.AbstractChannel.filterOutboundMessage.

Invoked when a new message is added to to the outbound queue of this AbstractChannel, so that the Channel implementation converts the message to another.
protected <T> T
private PeerCredentials
private DomainSocketReadMode
private int
private int
private int
getSoBusyPoll()

Get the SO_BUSY_POLL option on the socket.

private int
private EpollTcpInfo
getTcpInfo()

Updates and returns the TCP_INFO for the current socket.

private int
getTcpKeepCnt()

Get the TCP_KEEPCNT option on the socket.

private int
getTcpKeepIdle()

Get the TCP_KEEPIDLE option on the socket.

private int
getTcpKeepIntvl()

Get the TCP_KEEPINTVL option on the socket.

private long

Returns:

value is a uint32_t
getTcpNotSentLowAt
()

Get the TCP_NOTSENT_LOWAT option on the socket.

private int
getTcpUserTimeout()

Get the TCP_USER_TIMEOUT option on the socket.

private int
protected boolean
public boolean
isIpTransparent()

Returns true if IP_TRANSPARENT is enabled, false otherwise.

private boolean
private static boolean
private boolean
public boolean
isShutdown(ChannelShutdownDirection direction)

Implements io.netty5.channel.Channel.isShutdown.

Returns true if the ChannelShutdownDirection of the Channel was shutdown before.
private boolean
isTcpCork()

Get the TCP_CORK option on the socket.

private boolean
isTcpFastOpenConnect()

Returns true if TCP fast open is enabled, false otherwise.

private boolean
private boolean
isTcpQuickAck()

Returns true if TCP_QUICKACK is enabled, false otherwise.

private static WriteHandleFactory
protected Future<Executor>
protected <T> void
private void
setIpTransparent(boolean transparent)

If true is used IP_TRANSPARENT is enabled, false for disable it.

private void
setKeepAlive(boolean keepAlive)

private void
private void
setReceiveBufferSize(int receiveBufferSize)

private void
setReuseAddress(boolean reuseAddress)

private void
setSendBufferSize(int sendBufferSize)

private void
setSoBusyPoll(int loopMicros)

Set the SO_BUSY_POLL option on the socket.

private void
setSoLinger(int soLinger)

private void
setTcpCork(boolean tcpCork)

Set the TCP_CORK option on the socket.

private void
setTcpFastOpenConnect(boolean fastOpenConnect)

Enables client TCP fast open.

private void
setTcpKeepCnt(int probes)

Set the TCP_KEEPCNT option on the socket.

private void
setTcpKeepIdle(int seconds)

Set the TCP_KEEPIDLE option on the socket.

private void
setTcpKeepIntvl(int seconds)

Set the TCP_KEEPINTVL option on the socket.

private void
setTcpMd5Sig(Map<InetAddress, byte[]> keys)

Set the TCP_MD5SIG option on the socket.

private void
setTcpNoDelay(boolean tcpNoDelay)

private void
setTcpNotSentLowAt(long
is a uint32_t
tcpNotSentLowAt
)

Set the TCP_NOTSENT_LOWAT option on the socket.

private void
setTcpQuickAck(boolean quickAck)

Set the TCP_QUICKACK option on the socket.

private void
setTcpUserTimeout(int milliseconds)

Set the TCP_USER_TIMEOUT option on the socket.

private void
setTrafficClass(int trafficClass)

private static Set<ChannelOption<?>>
private static Set<ChannelOption<?>>
private void

Returns:

if we should continue with writing more messages.
writeBytes
(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink
the WriteSink used to track write results.
writeSink
)

Write bytes form the given Buffer to the underlying java.nio.channels.Channel.

private long

Returns:

if we should continue with writing more messages.
writeBytesMultiple
(IovArray
The array which contains the content to write.
array
)

Write multiple bytes via IovArray.

private long

Returns:

write result.
writeBytesMultiple
(ByteBuffer[]
The buffers to write.
nioBuffers
,
int
The number of buffers to write.
nioBufferCnt
,
long
The number of bytes we expect to write.
expectedWrittenBytes
,
long
The maximum number of bytes we should attempt to write.
maxBytesPerGatheringWrite
)

Write multiple bytes via ByteBuffer array.

private void

Returns:

if we should continue with writing more messages.
writeDefaultFileRegion
(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink
the WriteSink used to track write results.
writeSink
)

Write a DefaultFileRegion

private void

Returns:

if we should continue with writing more messages.
writeFileRegion
(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink
the WriteSink used to track write results.
writeSink
)

Write a FileRegion

Inherited from io.netty5.channel.epoll.AbstractEpollChannel:
checkResolvableclearFlagcloseTransportNowderegister0doBinddoClearScheduledReaddoClosedoConnectdoDisconnectdoFinishConnectdoReaddoReadBytesdoReadNowdoWriteBytesdoWriteOrSendBytesepollInReadyepollOutReadyepollRdHupReadyfdfetchLocalAddressflagsisActiveisOpenisSoErrorZeroisWriteFlushedScheduledlocalAddress0newDirectBuffernewDirectBufferreadBufferAllocatorreadLoopCompleteregister0registrationremoteAddress0resetCachedAddressessetFlagwriteLoopComplete

Field Detail

byteChannelback to summary
private WritableByteChannel byteChannel
EXPECTED_TYPESback to summary
private static final String EXPECTED_TYPES
modeback to summary
private volatile DomainSocketReadMode mode
SUPPORTED_OPTIONSback to summary
private static final Set<ChannelOption<?>> SUPPORTED_OPTIONS
SUPPORTED_OPTIONS_DOMAIN_SOCKETback to summary
private static final Set<ChannelOption<?>> SUPPORTED_OPTIONS_DOMAIN_SOCKET
tcpFastopenback to summary
private volatile boolean tcpFastopen
tcpMd5SigAddressesback to summary
private volatile Collection<InetAddress> tcpMd5SigAddresses

Constructor Detail

EpollSocketChannelback to summary
public EpollSocketChannel(EventLoop eventLoop)
EpollSocketChannelback to summary
public EpollSocketChannel(EventLoop eventLoop, ProtocolFamily protocolFamily)
EpollSocketChannelback to summary
public EpollSocketChannel(EventLoop eventLoop, int fd, ProtocolFamily family)
EpollSocketChannelback to summary
private EpollSocketChannel(EventLoop eventLoop, LinuxSocket socket)
EpollSocketChannelback to summary
pack-priv EpollSocketChannel(EpollServerSocketChannel parent, EventLoop eventLoop, LinuxSocket fd, SocketAddress remoteAddress)

Method Detail

doConnect0back to summary
protected boolean doConnect0(SocketAddress remote, Buffer initialData) throws Exception

Overrides io.netty5.channel.epoll.AbstractEpollChannel.doConnect0.

Annotations
@Override
doShutdownback to summary
protected void doShutdown(ChannelShutdownDirection direction) throws Exception

Implements abstract io.netty5.channel.AbstractChannel.doShutdown.

Doc from io.netty5.channel.AbstractChannel.doShutdown.

Shutdown one direction of the Channel.

Parameters
direction:ChannelShutdownDirection

the direction to shut down.

Annotations
@Override
Exceptions
Exception:
thrown on error.
doWriteMultipleback to summary
private void doWriteMultiple(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink writeSink) throws Exception

Attempt to write multiple Buffer objects.

Parameters
writeSink:AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink

the WriteSink used to track write results.

Returns:void

if we should continue with writing more messages.

Exceptions
Exception:
If an I/O error occurs.
doWriteNowback to summary
protected void doWriteNow(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink writeSink) throws Exception

Implements abstract io.netty5.channel.AbstractChannel.doWriteNow.

Doc from io.netty5.channel.AbstractChannel.doWriteNow.

Called in a loop when writes should be performed until this method returns false or there are no more messages to write. Implementations are responsible for handling partial writes, which for example means that if Buffers are written partial implementations need to ensure the readerOffset is updated accordingly.

Parameters
writeSink:AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink

the WriteSink that must be completed with the write progress. WriteSink#complete(long, long, int, boolean) or WriteSink#complete(long, Throwable, boolean) must be called exactly once before this method returns non-exceptional.

Annotations
@Override
Exceptions
Exception:
if an error happened during writing. This will also terminate the write loop.
doWriteSingleback to summary
private void doWriteSingle(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink writeSink) throws Exception

Attempt to write a single object.

Parameters
writeSink:AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink

the WriteSink used to track write results.

Returns:void

if we should continue with writing more messages.

Exceptions
Exception:
If an I/O error occurs.
epollInReadFdback to summary
private AbstractEpollChannel.ReadState epollInReadFd(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.ReadSink readSink) throws Exception
epollInReadyback to summary
protected AbstractEpollChannel.ReadState epollInReady(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.ReadSink readSink) throws Exception

Implements abstract io.netty5.channel.epoll.AbstractEpollChannel.epollInReady.

Doc from io.netty5.channel.epoll.AbstractEpollChannel.epollInReady.

Called once EPOLLIN event is ready to be processed

Annotations
@Override
epollInReadyBytesback to summary
private AbstractEpollChannel.ReadState epollInReadyBytes(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.ReadSink readSink) throws Exception
filterOutboundMessageback to summary
protected Object filterOutboundMessage(Object msg)

Overrides io.netty5.channel.AbstractChannel.filterOutboundMessage.

Doc from io.netty5.channel.AbstractChannel.filterOutboundMessage.

Invoked when a new message is added to to the outbound queue of this AbstractChannel, so that the Channel implementation converts the message to another. (e.g. heap buffer -> direct buffer)

Parameters
msg:Object

the message to filter / convert.

Annotations
@Override
getExtendedOptionback to summary
protected <T> T getExtendedOption(ChannelOption<T> option)

Overrides io.netty5.channel.epoll.AbstractEpollChannel.getExtendedOption.

Doc from io.netty5.channel.AbstractChannel.getExtendedOption.

Override to add support for more ChannelOptions. You need to also call super after handling the extra options.

Parameters
<T>
the value type.
option:ChannelOption<T>

the ChannelOption.

Returns:T

the value for the option.

Annotations
@SuppressWarnings:unchecked
@Override
getPeerCredentialsback to summary
private PeerCredentials getPeerCredentials()
getReadModeback to summary
private DomainSocketReadMode getReadMode()
getReceiveBufferSizeback to summary
private int getReceiveBufferSize()
getSendBufferSizeback to summary
private int getSendBufferSize()
getSoBusyPollback to summary
private int getSoBusyPoll()

Get the SO_BUSY_POLL option on the socket. See man 7 tcp for more details.

getSoLingerback to summary
private int getSoLinger()
getTcpInfoback to summary
private EpollTcpInfo getTcpInfo()

Updates and returns the TCP_INFO for the current socket. See man 7 tcp.

getTcpKeepCntback to summary
private int getTcpKeepCnt()

Get the TCP_KEEPCNT option on the socket. See man 7 tcp for more details.

getTcpKeepIdleback to summary
private int getTcpKeepIdle()

Get the TCP_KEEPIDLE option on the socket. See man 7 tcp for more details.

getTcpKeepIntvlback to summary
private int getTcpKeepIntvl()

Get the TCP_KEEPINTVL option on the socket. See man 7 tcp for more details.

getTcpNotSentLowAtback to summary
private long getTcpNotSentLowAt()

Get the TCP_NOTSENT_LOWAT option on the socket. See man 7 tcp for more details.

Returns:long

value is a uint32_t

getTcpUserTimeoutback to summary
private int getTcpUserTimeout()

Get the TCP_USER_TIMEOUT option on the socket. See man 7 tcp for more details.

getTrafficClassback to summary
private int getTrafficClass()
isExtendedOptionSupportedback to summary
protected boolean isExtendedOptionSupported(ChannelOption<?> option)

Overrides io.netty5.channel.epoll.AbstractEpollChannel.isExtendedOptionSupported.

Doc from io.netty5.channel.AbstractChannel.isExtendedOptionSupported.

Override to add support for more ChannelOptions. You need to also call super after handling the extra options.

Parameters
option:ChannelOption<?>

the ChannelOption.

Returns:boolean

true if supported, false otherwise.

Annotations
@Override
isIpTransparentback to summary
public boolean isIpTransparent()

Returns true if IP_TRANSPARENT is enabled, false otherwise.

isKeepAliveback to summary
private boolean isKeepAlive()
isOptionSupportedback to summary
private static boolean isOptionSupported(SocketProtocolFamily family, ChannelOption<?> option)
isReuseAddressback to summary
private boolean isReuseAddress()
isShutdownback to summary
public boolean isShutdown(ChannelShutdownDirection direction)

Implements io.netty5.channel.Channel.isShutdown.

Doc from io.netty5.channel.Channel.isShutdown.

Returns true if the ChannelShutdownDirection of the Channel was shutdown before.

Annotations
@Override
isTcpCorkback to summary
private boolean isTcpCork()

Get the TCP_CORK option on the socket. See man 7 tcp for more details.

isTcpFastOpenConnectback to summary
private boolean isTcpFastOpenConnect()

Returns true if TCP fast open is enabled, false otherwise.

isTcpNoDelayback to summary
private boolean isTcpNoDelay()
isTcpQuickAckback to summary
private boolean isTcpQuickAck()

Returns true if TCP_QUICKACK is enabled, false otherwise.

newWriteHandleFactoryback to summary
private static WriteHandleFactory newWriteHandleFactory()
prepareToCloseback to summary
protected Future<Executor> prepareToClose()

Overrides io.netty5.channel.AbstractChannel.prepareToClose.

Doc from io.netty5.channel.AbstractChannel.prepareToClose.

Prepares to close the Channel. If this method returns an Executor, the caller must call the Executor#execute(Runnable) method with a task that calls doClose() on the returned Executor. If this method returns null, doClose() must be called from the caller thread. (i.e. EventLoop)

Annotations
@Override
setExtendedOptionback to summary
protected <T> void setExtendedOption(ChannelOption<T> option, T value)

Overrides io.netty5.channel.epoll.AbstractEpollChannel.setExtendedOption.

Doc from io.netty5.channel.AbstractChannel.setExtendedOption.

Override to add support for more ChannelOptions. You need to also call super after handling the extra options.

Parameters
<T>
the value type.
option:ChannelOption<T>

the ChannelOption.

Annotations
@SuppressWarnings:unchecked
@Override
setIpTransparentback to summary
private void setIpTransparent(boolean transparent)

If true is used IP_TRANSPARENT is enabled, false for disable it. Default is disabled.

setKeepAliveback to summary
private void setKeepAlive(boolean keepAlive)
setReadModeback to summary
private void setReadMode(DomainSocketReadMode mode)
setReceiveBufferSizeback to summary
private void setReceiveBufferSize(int receiveBufferSize)
setReuseAddressback to summary
private void setReuseAddress(boolean reuseAddress)
setSendBufferSizeback to summary
private void setSendBufferSize(int sendBufferSize)
setSoBusyPollback to summary
private void setSoBusyPoll(int loopMicros)

Set the SO_BUSY_POLL option on the socket. See man 7 tcp for more details.

setSoLingerback to summary
private void setSoLinger(int soLinger)
setTcpCorkback to summary
private void setTcpCork(boolean tcpCork)

Set the TCP_CORK option on the socket. See man 7 tcp for more details.

setTcpFastOpenConnectback to summary
private void setTcpFastOpenConnect(boolean fastOpenConnect)

Enables client TCP fast open. 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.

setTcpKeepCntback to summary
private void setTcpKeepCnt(int probes)

Set the TCP_KEEPCNT option on the socket. See man 7 tcp for more details.

setTcpKeepIdleback to summary
private void setTcpKeepIdle(int seconds)

Set the TCP_KEEPIDLE option on the socket. See man 7 tcp for more details.

setTcpKeepIntvlback to summary
private void setTcpKeepIntvl(int seconds)

Set the TCP_KEEPINTVL option on the socket. See man 7 tcp for more details.

setTcpMd5Sigback to summary
private void setTcpMd5Sig(Map<InetAddress, byte[]> keys)

Set the 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.

setTcpNoDelayback to summary
private void setTcpNoDelay(boolean tcpNoDelay)
setTcpNotSentLowAtback to summary
private void setTcpNotSentLowAt(long tcpNotSentLowAt)

Set the TCP_NOTSENT_LOWAT option on the socket. See man 7 tcp for more details.

Parameters
tcpNotSentLowAt:long

is a uint32_t

setTcpQuickAckback to summary
private void setTcpQuickAck(boolean quickAck)

Set the TCP_QUICKACK option on the socket. See TCP_QUICKACK for more details.

setTcpUserTimeoutback to summary
private void setTcpUserTimeout(int milliseconds)

Set the TCP_USER_TIMEOUT option on the socket. See man 7 tcp for more details.

setTrafficClassback to summary
private void setTrafficClass(int trafficClass)
supportedOptionsback to summary
private static Set<ChannelOption<?>> supportedOptions()

Hides io.netty5.channel.AbstractChannel.supportedOptions.

supportedOptionsDomainSocketback to summary
private static Set<ChannelOption<?>> supportedOptionsDomainSocket()
writeBytesback to summary
private void writeBytes(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink writeSink) throws Exception

Write bytes form the given Buffer to the underlying java.nio.channels.Channel.

Parameters
writeSink:AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink

the WriteSink used to track write results.

Returns:void

if we should continue with writing more messages.

writeBytesMultipleback to summary
private long writeBytesMultiple(IovArray array) throws IOException

Write multiple bytes via IovArray.

Parameters
array:IovArray

The array which contains the content to write.

Returns:long

if we should continue with writing more messages.

Exceptions
IOException:
If an I/O exception occurs during write.
writeBytesMultipleback to summary
private long writeBytesMultiple(ByteBuffer[] nioBuffers, int nioBufferCnt, long expectedWrittenBytes, long maxBytesPerGatheringWrite) throws IOException

Write multiple bytes via ByteBuffer array.

Parameters
nioBuffers:ByteBuffer[]

The buffers to write.

nioBufferCnt:int

The number of buffers to write.

expectedWrittenBytes:long

The number of bytes we expect to write.

maxBytesPerGatheringWrite:long

The maximum number of bytes we should attempt to write.

Returns:long

write result.

Exceptions
IOException:
If an I/O exception occurs during write.
writeDefaultFileRegionback to summary
private void writeDefaultFileRegion(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink writeSink) throws Exception

Write a DefaultFileRegion

Parameters
writeSink:AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink

the WriteSink used to track write results.

Returns:void

if we should continue with writing more messages.

writeFileRegionback to summary
private void writeFileRegion(AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink writeSink) throws Exception

Write a FileRegion

Parameters
writeSink:AbstractChannel<EpollServerSocketChannel, SocketAddress, SocketAddress>.WriteSink

the WriteSink used to track write results.

Returns:void

if we should continue with writing more messages.

io.netty5.channel.epoll back to summary

private final Class EpollSocketChannel.EpollSocketWritableByteChannel

extends SocketWritableByteChannel
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected BufferAllocator
protected int
write(final ByteBuffer buf, final int pos, final int limit)

Overrides io.netty5.channel.unix.SocketWritableByteChannel.write.

Inherited from io.netty5.channel.unix.SocketWritableByteChannel:
closeisOpenwrite

Constructor Detail

EpollSocketWritableByteChannelback to summary
pack-priv EpollSocketWritableByteChannel()

Method Detail

allocback to summary
protected BufferAllocator alloc()

Implements abstract io.netty5.channel.unix.SocketWritableByteChannel.alloc.

Annotations
@Override
writeback to summary
protected int write(final ByteBuffer buf, final int pos, final int limit) throws IOException

Overrides io.netty5.channel.unix.SocketWritableByteChannel.write.

Annotations
@Override