Home / Class/ EpollSocketChannel Class — netty Architecture

EpollSocketChannel Class — netty Architecture

Architecture documentation for the EpollSocketChannel class in EpollSocketChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  2c71c8eb_67ba_8a90_901f_b9f83e55c7b3["EpollSocketChannel"]
  4aa9546a_b7a3_aed2_808c_e5a3633771d0["EpollSocketChannel.java"]
  2c71c8eb_67ba_8a90_901f_b9f83e55c7b3 -->|defined in| 4aa9546a_b7a3_aed2_808c_e5a3633771d0
  2e872401_4e17_9aa5_a077_27257fa7aaf5["EpollSocketChannel()"]
  2c71c8eb_67ba_8a90_901f_b9f83e55c7b3 -->|method| 2e872401_4e17_9aa5_a077_27257fa7aaf5
  0d2e2649_be88_d0fb_01f5_9f26dc7a4db4["EpollTcpInfo()"]
  2c71c8eb_67ba_8a90_901f_b9f83e55c7b3 -->|method| 0d2e2649_be88_d0fb_01f5_9f26dc7a4db4
  8b97a564_ee8b_3cb3_74b5_bc44c85d8217["InetSocketAddress()"]
  2c71c8eb_67ba_8a90_901f_b9f83e55c7b3 -->|method| 8b97a564_ee8b_3cb3_74b5_bc44c85d8217
  4a86c3be_2afd_bf98_aae5_108d22624fa5["EpollSocketChannelConfig()"]
  2c71c8eb_67ba_8a90_901f_b9f83e55c7b3 -->|method| 4a86c3be_2afd_bf98_aae5_108d22624fa5
  addffa32_408a_f37d_33d8_aedcb7c0144a["ServerSocketChannel()"]
  2c71c8eb_67ba_8a90_901f_b9f83e55c7b3 -->|method| addffa32_408a_f37d_33d8_aedcb7c0144a
  ba51274f_120d_fd6a_ca86_76d28b1fefb1["AbstractEpollUnsafe()"]
  2c71c8eb_67ba_8a90_901f_b9f83e55c7b3 -->|method| ba51274f_120d_fd6a_ca86_76d28b1fefb1
  525fdddd_b9ca_ffb6_0ead_e6193c18dc33["doConnect0()"]
  2c71c8eb_67ba_8a90_901f_b9f83e55c7b3 -->|method| 525fdddd_b9ca_ffb6_0ead_e6193c18dc33
  8f5a2b2f_9565_5ec7_dd22_88dd4b00e34f["setTcpMd5Sig()"]
  2c71c8eb_67ba_8a90_901f_b9f83e55c7b3 -->|method| 8f5a2b2f_9565_5ec7_dd22_88dd4b00e34f

Relationship Graph

Source Code

transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannel.java lines 44–187

public final class EpollSocketChannel extends AbstractEpollStreamChannel implements SocketChannel {

    private final EpollSocketChannelConfig config;

    private volatile Collection<InetAddress> tcpMd5SigAddresses = Collections.emptyList();

    public EpollSocketChannel() {
        super(newSocketStream(), false);
        config = new EpollSocketChannelConfig(this);
    }

    /**
     *
     * @deprecated use {@link EpollServerSocketChannel#EpollServerSocketChannel(SocketProtocolFamily)}.
     */
    @Deprecated
    public EpollSocketChannel(InternetProtocolFamily protocol) {
        super(newSocketStream(protocol), false);
        config = new EpollSocketChannelConfig(this);
    }

    public EpollSocketChannel(SocketProtocolFamily protocol) {
        super(newSocketStream(protocol), false);
        config = new EpollSocketChannelConfig(this);
    }

    public EpollSocketChannel(int fd) {
        super(fd);
        config = new EpollSocketChannelConfig(this);
    }

    EpollSocketChannel(LinuxSocket fd, boolean active) {
        super(fd, active);
        config = new EpollSocketChannelConfig(this);
    }

    EpollSocketChannel(Channel parent, LinuxSocket fd, InetSocketAddress remoteAddress) {
        super(parent, fd, remoteAddress);
        config = new EpollSocketChannelConfig(this);

        if (parent instanceof EpollServerSocketChannel) {
            tcpMd5SigAddresses = ((EpollServerSocketChannel) parent).tcpMd5SigAddresses();
        }
    }

    /**
     * Returns the {@code TCP_INFO} for the current socket.
     * See <a href="https://linux.die.net//man/7/tcp">man 7 tcp</a>.
     */
    public EpollTcpInfo tcpInfo() {
        return tcpInfo(new EpollTcpInfo());
    }

    /**
     * Updates and returns the {@code TCP_INFO} for the current socket.
     * See <a href="https://linux.die.net//man/7/tcp">man 7 tcp</a>.
     */
    public EpollTcpInfo tcpInfo(EpollTcpInfo info) {
        try {
            socket.getTcpInfo(info);
            return info;
        } catch (IOException e) {
            throw new ChannelException(e);
        }
    }

    @Override
    public InetSocketAddress remoteAddress() {
        return (InetSocketAddress) super.remoteAddress();
    }

    @Override
    public InetSocketAddress localAddress() {
        return (InetSocketAddress) super.localAddress();
    }

    @Override
    public EpollSocketChannelConfig config() {
        return config;
    }

Frequently Asked Questions

What is the EpollSocketChannel class?
EpollSocketChannel is a class in the netty codebase, defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannel.java.
Where is EpollSocketChannel defined?
EpollSocketChannel is defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannel.java at line 44.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free