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

public final Class EpollSocketChannel

extends AbstractEpollStreamChannel
implements SocketChannel
Class Inheritance
All Implemented Interfaces
io.netty.channel.socket.SocketChannel, io.netty.channel.socket.DuplexChannel, io.netty.channel.Channel, java.lang.Comparable, io.netty.channel.ChannelOutboundInvoker, io.netty.util.AttributeMap
Imports
io.netty.buffer.ByteBuf, io.netty.channel.Channel, .ChannelException, .ChannelOutboundBuffer, io.netty.channel.socket.InternetProtocolFamily, .ServerSocketChannel, .SocketChannel, io.netty.util.concurrent.GlobalEventExecutor, java.io.IOException, java.net.InetAddress, .InetSocketAddress, .SocketAddress, java.util.Collection, .Collections, .Map, java.util.concurrent.Executor

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final EpollSocketChannelConfig
private volatile Collection<InetAddress>

Constructor Summary

AccessConstructor and Description
public
public
public
pack-priv
EpollSocketChannel(LinuxSocket fd, boolean active)

pack-priv

Method Summary

Modifier and TypeMethod and Description
public EpollSocketChannelConfig
pack-priv boolean
public InetSocketAddress
protected AbstractEpollChannel.AbstractEpollUnsafe
newUnsafe()

Overrides io.netty.channel.epoll.AbstractEpollStreamChannel.newUnsafe.

Create a new AbstractUnsafe instance which will be used for the life-time of the Channel
public ServerSocketChannel
public InetSocketAddress
pack-priv void
setTcpMd5Sig(Map<InetAddress, byte[]> keys)

public EpollTcpInfo
tcpInfo()

Returns the TCP_INFO for the current socket.

public EpollTcpInfo
tcpInfo(EpollTcpInfo info)

Updates and returns the TCP_INFO for the current socket.

Inherited from io.netty.channel.epoll.AbstractEpollStreamChannel:
doClosedoShutdownOutputdoWritedoWriteSinglefilterOutboundMessageisInputShutdownisOutputShutdownisShutdownmetadatashutdownshutdownshutdownInputshutdownInputshutdownOutputshutdownOutputspliceTospliceTospliceTospliceTo

Field Detail

configback to summary
private final EpollSocketChannelConfig config
tcpMd5SigAddressesback to summary
private volatile Collection<InetAddress> tcpMd5SigAddresses

Constructor Detail

EpollSocketChannelback to summary
public EpollSocketChannel()
EpollSocketChannelback to summary
public EpollSocketChannel(InternetProtocolFamily protocol)
EpollSocketChannelback to summary
public EpollSocketChannel(int fd)
EpollSocketChannelback to summary
pack-priv EpollSocketChannel(LinuxSocket fd, boolean active)
EpollSocketChannelback to summary
pack-priv EpollSocketChannel(Channel parent, LinuxSocket fd, InetSocketAddress remoteAddress)

Method Detail

configback to summary
public EpollSocketChannelConfig config()

Implements abstract io.netty.channel.epoll.AbstractEpollChannel.config.

Implements io.netty.channel.socket.SocketChannel.config, io.netty.channel.Channel.config.

Doc from io.netty.channel.Channel.config.

Returns the configuration of this channel.

Annotations
@Override
doConnect0back to summary
pack-priv boolean doConnect0(SocketAddress remote) throws Exception

Overrides io.netty.channel.epoll.AbstractEpollChannel.doConnect0.

Annotations
@Override
localAddressback to summary
public InetSocketAddress localAddress()

Overrides io.netty.channel.AbstractChannel.localAddress.

Implements io.netty.channel.socket.SocketChannel.localAddress, io.netty.channel.Channel.localAddress.

Doc from io.netty.channel.Channel.localAddress.

Returns the local address where this channel is bound to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.

Returns:InetSocketAddress

the local address of this channel. null if this channel is not bound.

Annotations
@Override
newUnsafeback to summary
protected AbstractEpollChannel.AbstractEpollUnsafe newUnsafe()

Overrides io.netty.channel.epoll.AbstractEpollStreamChannel.newUnsafe.

Doc from io.netty.channel.AbstractChannel.newUnsafe.

Create a new AbstractUnsafe instance which will be used for the life-time of the Channel

Annotations
@Override
parentback to summary
public ServerSocketChannel parent()

Overrides io.netty.channel.AbstractChannel.parent.

Implements io.netty.channel.socket.SocketChannel.parent, io.netty.channel.Channel.parent.

Doc from io.netty.channel.Channel.parent.

Returns the parent of this channel.

Returns:ServerSocketChannel

the parent channel. null if this channel does not have a parent channel.

Annotations
@Override
remoteAddressback to summary
public InetSocketAddress remoteAddress()

Overrides io.netty.channel.AbstractChannel.remoteAddress.

Implements io.netty.channel.socket.SocketChannel.remoteAddress, io.netty.channel.Channel.remoteAddress.

Doc from io.netty.channel.Channel.remoteAddress.

Returns the remote address where this channel is connected to. The returned SocketAddress is supposed to be down-cast into more concrete type such as InetSocketAddress to retrieve the detailed information.

Returns:InetSocketAddress

the remote address of this channel. null if this channel is not connected. If this channel is not connected but it can receive messages from arbitrary remote addresses (e.g. DatagramChannel, use DatagramPacket#recipient() to determine the origination of the received message as this method will return null.

Annotations
@Override
setTcpMd5Sigback to summary
pack-priv void setTcpMd5Sig(Map<InetAddress, byte[]> keys) throws IOException
tcpInfoback to summary
public EpollTcpInfo tcpInfo()

Returns the TCP_INFO for the current socket. See man 7 tcp.

tcpInfoback to summary
public EpollTcpInfo tcpInfo(EpollTcpInfo info)

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

io.netty.channel.epoll back to summary

private final Class EpollSocketChannel.EpollSocketChannelUnsafe

extends EpollStreamUnsafe
Class Inheritance

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected Executor
Inherited from io.netty.channel.epoll.AbstractEpollStreamChannel.EpollStreamUnsafe:
epollInReadynewEpollHandle

Constructor Detail

EpollSocketChannelUnsafeback to summary
private EpollSocketChannelUnsafe()

Method Detail

prepareToCloseback to summary
protected Executor prepareToClose()

Overrides io.netty.channel.epoll.AbstractEpollStreamChannel.EpollStreamUnsafe.prepareToClose.

Doc from io.netty.channel.AbstractChannel.AbstractUnsafe.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