public final class EpollDatagramChannel
extends io.netty.channel.AbstractChannel
implements io.netty.channel.socket.DatagramChannel
DatagramChannel
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 |
---|
EpollDatagramChannel() |
EpollDatagramChannel(FileDescriptor fd)
Deprecated.
|
EpollDatagramChannel(Socket fd) |
Modifier and Type | Method and Description |
---|---|
io.netty.channel.ChannelFuture |
block(InetAddress multicastAddress,
InetAddress sourceToBlock) |
io.netty.channel.ChannelFuture |
block(InetAddress multicastAddress,
InetAddress sourceToBlock,
io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
block(InetAddress multicastAddress,
NetworkInterface networkInterface,
InetAddress sourceToBlock) |
io.netty.channel.ChannelFuture |
block(InetAddress multicastAddress,
NetworkInterface networkInterface,
InetAddress sourceToBlock,
io.netty.channel.ChannelPromise promise) |
protected static void |
checkResolvable(InetSocketAddress addr) |
EpollDatagramChannelConfig |
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 void |
doWrite(io.netty.channel.ChannelOutboundBuffer in) |
protected int |
doWriteBytes(io.netty.buffer.ByteBuf buf,
int writeSpinCount) |
Socket |
fd()
Returns the
FileDescriptor that is used by this Channel . |
protected Object |
filterOutboundMessage(Object msg) |
boolean |
isActive() |
protected boolean |
isCompatible(io.netty.channel.EventLoop loop) |
boolean |
isConnected() |
boolean |
isOpen() |
io.netty.channel.ChannelFuture |
joinGroup(InetAddress multicastAddress) |
io.netty.channel.ChannelFuture |
joinGroup(InetAddress multicastAddress,
io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
joinGroup(InetAddress multicastAddress,
NetworkInterface networkInterface,
InetAddress source) |
io.netty.channel.ChannelFuture |
joinGroup(InetAddress multicastAddress,
NetworkInterface networkInterface,
InetAddress source,
io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
joinGroup(InetSocketAddress multicastAddress,
NetworkInterface networkInterface) |
io.netty.channel.ChannelFuture |
joinGroup(InetSocketAddress multicastAddress,
NetworkInterface networkInterface,
io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
leaveGroup(InetAddress multicastAddress) |
io.netty.channel.ChannelFuture |
leaveGroup(InetAddress multicastAddress,
io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
leaveGroup(InetAddress multicastAddress,
NetworkInterface networkInterface,
InetAddress source) |
io.netty.channel.ChannelFuture |
leaveGroup(InetAddress multicastAddress,
NetworkInterface networkInterface,
InetAddress source,
io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
leaveGroup(InetSocketAddress multicastAddress,
NetworkInterface networkInterface) |
io.netty.channel.ChannelFuture |
leaveGroup(InetSocketAddress multicastAddress,
NetworkInterface networkInterface,
io.netty.channel.ChannelPromise promise) |
InetSocketAddress |
localAddress() |
protected InetSocketAddress |
localAddress0() |
io.netty.channel.ChannelMetadata |
metadata() |
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. |
protected io.netty.channel.epoll.AbstractEpollChannel.AbstractEpollUnsafe |
newUnsafe() |
InetSocketAddress |
remoteAddress() |
protected InetSocketAddress |
remoteAddress0() |
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, 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, isOpen, isRegistered, isWritable, 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 EpollDatagramChannel()
@Deprecated public EpollDatagramChannel(FileDescriptor fd)
EpollDatagramChannel(Socket)
.public EpollDatagramChannel(Socket fd)
public InetSocketAddress remoteAddress()
remoteAddress
in interface io.netty.channel.Channel
remoteAddress
in interface io.netty.channel.socket.DatagramChannel
remoteAddress
in class io.netty.channel.AbstractChannel
public InetSocketAddress localAddress()
localAddress
in interface io.netty.channel.Channel
localAddress
in interface io.netty.channel.socket.DatagramChannel
localAddress
in class io.netty.channel.AbstractChannel
public io.netty.channel.ChannelMetadata metadata()
metadata
in interface io.netty.channel.Channel
public boolean isActive()
isActive
in interface io.netty.channel.Channel
public boolean isConnected()
isConnected
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture joinGroup(InetAddress multicastAddress)
joinGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture joinGroup(InetAddress multicastAddress, io.netty.channel.ChannelPromise promise)
joinGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture joinGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface)
joinGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture joinGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface, io.netty.channel.ChannelPromise promise)
joinGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture joinGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source)
joinGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture joinGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source, io.netty.channel.ChannelPromise promise)
joinGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture leaveGroup(InetAddress multicastAddress)
leaveGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture leaveGroup(InetAddress multicastAddress, io.netty.channel.ChannelPromise promise)
leaveGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture leaveGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface)
leaveGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture leaveGroup(InetSocketAddress multicastAddress, NetworkInterface networkInterface, io.netty.channel.ChannelPromise promise)
leaveGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture leaveGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source)
leaveGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture leaveGroup(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress source, io.netty.channel.ChannelPromise promise)
leaveGroup
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture block(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock)
block
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture block(InetAddress multicastAddress, NetworkInterface networkInterface, InetAddress sourceToBlock, io.netty.channel.ChannelPromise promise)
block
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture block(InetAddress multicastAddress, InetAddress sourceToBlock)
block
in interface io.netty.channel.socket.DatagramChannel
public io.netty.channel.ChannelFuture block(InetAddress multicastAddress, InetAddress sourceToBlock, io.netty.channel.ChannelPromise promise)
block
in interface io.netty.channel.socket.DatagramChannel
protected io.netty.channel.epoll.AbstractEpollChannel.AbstractEpollUnsafe newUnsafe()
protected InetSocketAddress localAddress0()
localAddress0
in class io.netty.channel.AbstractChannel
protected InetSocketAddress remoteAddress0()
remoteAddress0
in class io.netty.channel.AbstractChannel
protected void doBind(SocketAddress localAddress) throws Exception
doBind
in class io.netty.channel.AbstractChannel
Exception
protected void doWrite(io.netty.channel.ChannelOutboundBuffer in) throws Exception
doWrite
in class io.netty.channel.AbstractChannel
Exception
protected Object filterOutboundMessage(Object msg)
filterOutboundMessage
in class io.netty.channel.AbstractChannel
public EpollDatagramChannelConfig config()
config
in interface io.netty.channel.Channel
config
in interface io.netty.channel.socket.DatagramChannel
public final Socket fd()
UnixChannel
FileDescriptor
that is used by this Channel
.fd
in interface UnixChannel
protected void doClose() throws Exception
doClose
in class io.netty.channel.AbstractChannel
Exception
protected boolean isCompatible(io.netty.channel.EventLoop loop)
isCompatible
in class io.netty.channel.AbstractChannel
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
Copyright © 2008–2017 The Netty Project. All rights reserved.