io.netty5.channel.socket.ServerSocketChannel implementation which uses
NIO selector based implementation to accept new connections.
io.netty5.channel.socket.SocketChannel ,
NioSocketChannel allows the following options in the option map:
ChannelOption |
INET |
INET6 |
{@code UNIX |
|---|---|---|---|
NioChannelOption | X | X | X |
| Modifier and Type | Field and Description |
|---|---|
| private volatile int | |
| private volatile boolean | |
| private final EventLoopGroup | |
| private static final SelectorProvider | |
| private final ProtocolFamily | |
| private static final InternalLogger | |
| private static final Method |
| Access | Constructor and Description |
|---|---|
| public | NioServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup)
Create a new instance |
| public | NioServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, SelectorProvider provider)
Create a new instance using the given |
| public | NioServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, SelectorProvider provider, ProtocolFamily protocolFamily)
Create a new instance using the given |
| public | NioServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, ServerSocketChannel channel)
Create a new instance using the given |
| public | NioServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, ServerSocketChannel channel, ProtocolFamily family)
Create a new instance using the given |
| Modifier and Type | Method and Description |
|---|---|
| public EventLoopGroup | childEventLoopGroup()
Implements io. EventLoopGroup that is used to register the child Channels on after accepting
these.
|
| protected void | doBind(SocketAddress
the localAddress)SocketAddress to bound to.Implements abstract io. Channel to the SocketAddress
|
| protected boolean | doConnect(SocketAddress
the address of the remote peer. remoteAddress, SocketAddress the local address of this channel. localAddress, Buffer the initial data that is written during connect
(if initialData)ChannelOption#TCP_FASTOPEN_CONNECT is supported and configured).
If data is written care must be taken to update the
reader offset.Implements abstract io. |
| protected void | doDisconnect()
Implements abstract io. Channel from its remote peer
|
| protected boolean | doFinishConnect(SocketAddress
the remote address of the peer. requestedRemoteAddress)Implements abstract io. |
| protected int | doReadMessages(AbstractChannel<Channel, SocketAddress, SocketAddress>.
Implements abstract io. |
| protected void | doShutdown(ChannelShutdownDirection
the direction to shut down. direction)Implements abstract io. Channel.
|
| protected void | doWriteNow(AbstractChannel<Channel, SocketAddress, SocketAddress>.
the writeHandleWriteSink 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.Implements abstract io. false or there are
no more messages to write.
|
| protected final Object | filterOutboundMessage(Object
the message to filter / convert. msg)Overrides io. AbstractChannel, so that
the Channel implementation converts the message to another.
|
| private int | |
| protected <T> T | getExtendedOption(ChannelOption<T>
the option)ChannelOption.Overrides io. ChannelOptions.
|
| public boolean | isActive()
Implements io. true if the Channel is active and so connected.
|
| protected boolean | isExtendedOptionSupported(ChannelOption<?>
the option)ChannelOption.Overrides io. ChannelOptions.
|
| public boolean | isShutdown(ChannelShutdownDirection direction)
Implements io. true if the ChannelShutdownDirection of the Channel was shutdown before.
|
| protected ServerSocketChannel | |
| protected SocketAddress | localAddress0()
Implements abstract io. SocketAddress which is bound locally.
|
| private static ServerSocketChannel | |
| protected SocketAddress | remoteAddress0()
Implements abstract io. SocketAddress which the Channel is connected to.
|
| private void | |
| protected <T> void | setExtendedOption(ChannelOption<T>
the option, T value)ChannelOption.Overrides io. ChannelOptions.
|
| backlog | back to summary |
|---|---|
| private volatile int backlog | |
| bound | back to summary |
|---|---|
| private volatile boolean bound | |
| childEventLoopGroup | back to summary |
|---|---|
| private final EventLoopGroup childEventLoopGroup | |
| DEFAULT_SELECTOR_PROVIDER | back to summary |
|---|---|
| private static final SelectorProvider DEFAULT_SELECTOR_PROVIDER | |
| family | back to summary |
|---|---|
| private final ProtocolFamily family | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| OPEN_SERVER_SOCKET_CHANNEL_WITH_FAMILY | back to summary |
|---|---|
| private static final Method OPEN_SERVER_SOCKET_CHANNEL_WITH_FAMILY | |
| NioServerSocketChannel | back to summary |
|---|---|
| public NioServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup) Create a new instance | |
| NioServerSocketChannel | back to summary |
|---|---|
| public NioServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, SelectorProvider provider) Create a new instance using the given | |
| NioServerSocketChannel | back to summary |
|---|---|
| public NioServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, SelectorProvider provider, ProtocolFamily protocolFamily) Create a new instance using the given | |
| NioServerSocketChannel | back to summary |
|---|---|
| public NioServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, ServerSocketChannel channel) Create a new instance using the given | |
| NioServerSocketChannel | back to summary |
|---|---|
| public NioServerSocketChannel(EventLoop eventLoop, EventLoopGroup childEventLoopGroup, ServerSocketChannel channel, ProtocolFamily family) Create a new instance using the given | |
| childEventLoopGroup | back to summary |
|---|---|
| public EventLoopGroup childEventLoopGroup() Implements io. Doc from io. Returns the
| |
| doBind | back to summary |
|---|---|
| protected void doBind(SocketAddress localAddress) throws Exception Implements abstract io. Doc from io. Bind the
| |
| doConnect | back to summary |
|---|---|
| protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress, Buffer initialData) Implements abstract io. Doc from io. Connect to remote peer. This method should never be directly called.
| |
| doDisconnect | back to summary |
|---|---|
| protected void doDisconnect() Implements abstract io. Doc from io. Disconnect this
| |
| doFinishConnect | back to summary |
|---|---|
| protected boolean doFinishConnect(SocketAddress requestedRemoteAddress) Implements abstract io. Doc from io. Finish a connect request. This method should never be directly called, use
| |
| doReadMessages | back to summary |
|---|---|
| protected int doReadMessages(AbstractChannel<Channel, SocketAddress, SocketAddress>. Implements abstract io. Doc from io. Read messages into the given array and return the amount which was read.
| |
| doShutdown | back to summary |
|---|---|
| protected void doShutdown(ChannelShutdownDirection direction) throws Exception Implements abstract io. Doc from io. Shutdown one direction of the
| |
| doWriteNow | back to summary |
|---|---|
| protected void doWriteNow(AbstractChannel<Channel, SocketAddress, SocketAddress>. Implements abstract io. Doc from io. Called in a loop when writes should be performed until this method returns
| |
| filterOutboundMessage | back to summary |
|---|---|
| protected final Object filterOutboundMessage(Object msg) Overrides io. Doc from io. Invoked when a new message is added to to the outbound queue of this | |
| getBacklog | back to summary |
|---|---|
| private int getBacklog() | |
| getExtendedOption | back to summary |
|---|---|
| protected <T> T getExtendedOption(ChannelOption<T> option) Overrides io. Doc from io. Override to add support for more
| |
| isActive | back to summary |
|---|---|
| public boolean isActive() Implements io. Doc from io. Return
| |
| isExtendedOptionSupported | back to summary |
|---|---|
| protected boolean isExtendedOptionSupported(ChannelOption<?> option) Overrides io. Doc from io. Override to add support for more
| |
| isShutdown | back to summary |
|---|---|
| public boolean isShutdown(ChannelShutdownDirection direction) Implements io. Doc from io. Returns
| |
| javaChannel | back to summary |
|---|---|
| protected ServerSocketChannel javaChannel() Overrides io.
| |
| localAddress0 | back to summary |
|---|---|
| protected SocketAddress localAddress0() Implements abstract io. Doc from io. Returns the
| |
| newChannel | back to summary |
|---|---|
| private static ServerSocketChannel newChannel(SelectorProvider provider, ProtocolFamily family) | |
| remoteAddress0 | back to summary |
|---|---|
| protected SocketAddress remoteAddress0() Implements abstract io. Doc from io. Return the
| |
| setBacklog | back to summary |
|---|---|
| private void setBacklog(int backlog) | |
| setExtendedOption | back to summary |
|---|---|
| protected <T> void setExtendedOption(ChannelOption<T> option, T value) Overrides io. Doc from io. Override to add support for more
| |