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(FileDescriptor fd)
Deprecated.
Use
EpollServerSocketChannel(Socket, boolean).
Creates a new EpollServerSocketChannel from an existing FileDescriptor. |
EpollServerSocketChannel(Socket fd)
Deprecated.
Use
EpollServerSocketChannel(Socket, boolean).
Creates a new EpollServerSocketChannel from an existing Socket. |
EpollServerSocketChannel(Socket fd,
boolean active) |
| 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.buffer.ByteBuf buf,
int writeSpinCount) |
Socket |
fd()
Returns the
FileDescriptor that is used by this Channel. |
boolean |
isActive() |
protected boolean |
isCompatible(io.netty.channel.EventLoop loop) |
boolean |
isOpen() |
InetSocketAddress |
localAddress() |
protected SocketAddress |
localAddress0() |
io.netty.channel.ChannelMetadata |
metadata() |
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, newUnsafe, remoteAddress0alloc, bind, bind, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doShutdownOutput, equals, eventLoop, flush, hashCode, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, newChannelPipeline, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushclone, finalize, getClass, notify, notifyAll, wait, wait, waitalloc, bind, bind, close, close, closeFuture, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, eventLoop, flush, isActive, isOpen, isRegistered, isWritable, metadata, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlushcompareTopublic EpollServerSocketChannel()
@Deprecated public EpollServerSocketChannel(FileDescriptor fd)
EpollServerSocketChannel(Socket, boolean).
Creates a new EpollServerSocketChannel from an existing FileDescriptor.@Deprecated public EpollServerSocketChannel(Socket fd)
EpollServerSocketChannel(Socket, boolean).
Creates a new EpollServerSocketChannel from an existing Socket.public EpollServerSocketChannel(Socket fd, boolean active)
protected boolean isCompatible(io.netty.channel.EventLoop loop)
isCompatible in class AbstractEpollServerChannelprotected void doBind(SocketAddress localAddress) throws Exception
Exceptionpublic InetSocketAddress remoteAddress()
remoteAddress in interface io.netty.channel.ChannelremoteAddress in interface io.netty.channel.socket.ServerSocketChannelremoteAddress in class io.netty.channel.AbstractChannelpublic InetSocketAddress localAddress()
localAddress in interface io.netty.channel.ChannellocalAddress in interface io.netty.channel.socket.ServerSocketChannellocalAddress in class io.netty.channel.AbstractChannelpublic EpollServerSocketChannelConfig config()
config in interface io.netty.channel.Channelconfig in interface io.netty.channel.socket.ServerSocketChannelprotected io.netty.channel.Channel newChildChannel(int fd,
byte[] address,
int offset,
int len)
throws Exception
Exceptionpublic final Socket fd()
UnixChannelFileDescriptor that is used by this Channel.fd in interface UnixChannelpublic boolean isActive()
isActive in interface io.netty.channel.Channelpublic io.netty.channel.ChannelMetadata metadata()
metadata in interface io.netty.channel.Channelprotected void doClose()
throws Exception
doClose in class io.netty.channel.AbstractChannelExceptionprotected void doDisconnect()
throws Exception
doDisconnect in class io.netty.channel.AbstractChannelExceptionpublic boolean isOpen()
isOpen in interface io.netty.channel.Channelprotected void doDeregister()
throws Exception
doDeregister in class io.netty.channel.AbstractChannelExceptionprotected void doBeginRead()
throws Exception
doBeginRead in class io.netty.channel.AbstractChannelExceptionprotected void doRegister()
throws Exception
doRegister in class io.netty.channel.AbstractChannelExceptionprotected 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.Exceptionprotected final int doWriteBytes(io.netty.buffer.ByteBuf buf,
int writeSpinCount)
throws Exception
Exceptionprotected SocketAddress localAddress0()
localAddress0 in class io.netty.channel.AbstractChannelCopyright © 2008–2018 The Netty Project. All rights reserved.