public final class EpollServerSocketChannel extends AbstractEpollServerChannel implements io.netty.channel.socket.ServerSocketChannel
ServerSocketChannel
implementation that uses linux EPOLL Edge-Triggered Mode for
maximal performance.Modifier and Type | Field and Description |
---|---|
protected boolean |
active |
protected int |
flags |
Constructor and Description |
---|
EpollServerSocketChannel() |
EpollServerSocketChannel(int fd) |
Modifier and Type | Method and Description |
---|---|
protected static void |
checkResolvable(InetSocketAddress addr) |
EpollServerSocketChannelConfig |
config() |
protected void |
doBeginRead() |
protected void |
doBind(SocketAddress localAddress) |
protected void |
doClose() |
protected void |
doDeregister() |
protected void |
doDisconnect() |
protected int |
doReadBytes(io.netty.buffer.ByteBuf byteBuf)
Read bytes into the given
ByteBuf and return the amount. |
protected void |
doRegister() |
protected int |
doWriteBytes(io.netty.channel.ChannelOutboundBuffer in,
io.netty.buffer.ByteBuf buf) |
io.netty.channel.unix.FileDescriptor |
fd() |
boolean |
isActive() |
protected boolean |
isCompatible(io.netty.channel.EventLoop loop) |
boolean |
isOpen() |
InetSocketAddress |
localAddress() |
protected SocketAddress |
localAddress0() |
protected io.netty.channel.Channel |
newChildChannel(int fd,
byte[] address,
int offset,
int len) |
protected io.netty.buffer.ByteBuf |
newDirectBuffer(io.netty.buffer.ByteBuf buf)
Returns an off-heap copy of the specified
ByteBuf , and releases the original one. |
protected io.netty.buffer.ByteBuf |
newDirectBuffer(Object holder,
io.netty.buffer.ByteBuf buf)
Returns an off-heap copy of the specified
ByteBuf , and releases the specified holder. |
InetSocketAddress |
remoteAddress() |
doConnect, doWrite, filterOutboundMessage, metadata, newUnsafe, remoteAddress0
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doShutdownOutput, equals, eventLoop, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlush
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isActive, isOpen, isRegistered, isWritable, metadata, parent, pipeline, read, unsafe
bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlush
compareTo
public EpollServerSocketChannel()
public EpollServerSocketChannel(int fd)
protected boolean isCompatible(io.netty.channel.EventLoop loop)
isCompatible
in class AbstractEpollServerChannel
protected void doBind(SocketAddress localAddress) throws Exception
Exception
public InetSocketAddress remoteAddress()
remoteAddress
in interface io.netty.channel.Channel
remoteAddress
in interface io.netty.channel.socket.ServerSocketChannel
remoteAddress
in class io.netty.channel.AbstractChannel
public InetSocketAddress localAddress()
localAddress
in interface io.netty.channel.Channel
localAddress
in interface io.netty.channel.socket.ServerSocketChannel
localAddress
in class io.netty.channel.AbstractChannel
public EpollServerSocketChannelConfig config()
config
in interface io.netty.channel.Channel
config
in interface io.netty.channel.socket.ServerSocketChannel
protected io.netty.channel.Channel newChildChannel(int fd, byte[] address, int offset, int len) throws Exception
Exception
public final io.netty.channel.unix.FileDescriptor fd()
fd
in interface io.netty.channel.unix.UnixChannel
public boolean isActive()
isActive
in interface io.netty.channel.Channel
protected void doClose() throws Exception
doClose
in class io.netty.channel.AbstractChannel
Exception
protected void doDisconnect() throws Exception
doDisconnect
in class io.netty.channel.AbstractChannel
Exception
public boolean isOpen()
isOpen
in interface io.netty.channel.Channel
protected void doDeregister() throws Exception
doDeregister
in class io.netty.channel.AbstractChannel
Exception
protected final void doBeginRead() throws Exception
doBeginRead
in class io.netty.channel.AbstractChannel
Exception
protected void doRegister() throws Exception
doRegister
in class io.netty.channel.AbstractChannel
Exception
protected final io.netty.buffer.ByteBuf newDirectBuffer(io.netty.buffer.ByteBuf buf)
ByteBuf
, and releases the original one.protected final io.netty.buffer.ByteBuf newDirectBuffer(Object holder, io.netty.buffer.ByteBuf buf)
ByteBuf
, and releases the specified holder.
The caller must ensure that the holder releases the original ByteBuf
when the holder is released by
this method.protected static void checkResolvable(InetSocketAddress addr)
protected final int doReadBytes(io.netty.buffer.ByteBuf byteBuf) throws Exception
ByteBuf
and return the amount.Exception
protected final int doWriteBytes(io.netty.channel.ChannelOutboundBuffer in, io.netty.buffer.ByteBuf buf) throws Exception
Exception
protected SocketAddress localAddress0()
localAddress0
in class io.netty.channel.AbstractChannel
Copyright © 2008–2019 The Netty Project. All rights reserved.