EpollDatagramChannel Class — netty Architecture
Architecture documentation for the EpollDatagramChannel class in EpollDatagramChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9["EpollDatagramChannel"] b45f5a76_cc28_594a_91e8_cf222446cc84["EpollDatagramChannel.java"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|defined in| b45f5a76_cc28_594a_91e8_cf222446cc84 acef28da_1fc2_d3a3_c3ba_ad5652b52a8b["isSegmentedDatagramPacketSupported()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| acef28da_1fc2_d3a3_c3ba_ad5652b52a8b f8e0d347_5b63_aa61_6502_7452764ddd24["EpollDatagramChannel()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| f8e0d347_5b63_aa61_6502_7452764ddd24 b19ff292_c963_02c3_fd98_3a4a04754e1e["InetSocketAddress()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| b19ff292_c963_02c3_fd98_3a4a04754e1e 1f8e2ff7_096e_9c78_f3e8_ab114b6cb2c7["ChannelMetadata()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| 1f8e2ff7_096e_9c78_f3e8_ab114b6cb2c7 61ced0a6_9617_c6bd_98cd_3b5cba5b0cd2["isActive()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| 61ced0a6_9617_c6bd_98cd_3b5cba5b0cd2 daa0830e_c1a5_555e_b994_3e9c10904a12["isConnected()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| daa0830e_c1a5_555e_b994_3e9c10904a12 48c41081_e738_42d1_96c1_9fec0343e1e4["ChannelFuture()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| 48c41081_e738_42d1_96c1_9fec0343e1e4 f8be697c_d788_69f5_050a_7c199ee8086f["joinGroup0()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| f8be697c_d788_69f5_050a_7c199ee8086f c6f7778f_13fd_a159_fc43_449e763fe93e["leaveGroup0()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| c6f7778f_13fd_a159_fc43_449e763fe93e e5cf9652_c822_2394_e2c5_86e83fa1775b["AbstractEpollUnsafe()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| e5cf9652_c822_2394_e2c5_86e83fa1775b c3b30228_031c_9274_e2a3_2e9e83ee3d0b["doBind()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| c3b30228_031c_9274_e2a3_2e9e83ee3d0b 5d8b824f_1d60_b1ed_e124_4f2179ce144c["doWrite()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| 5d8b824f_1d60_b1ed_e124_4f2179ce144c b105a0f5_23fa_a7fb_ac82_23b3039c4e43["doWriteMessage()"] dab3c3bb_b3e2_f3b8_e8e0_37c99496afe9 -->|method| b105a0f5_23fa_a7fb_ac82_23b3039c4e43
Relationship Graph
Source Code
transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollDatagramChannel.java lines 61–818
public final class EpollDatagramChannel extends AbstractEpollChannel implements DatagramChannel {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(EpollDatagramChannel.class);
private static final boolean IP_MULTICAST_ALL =
SystemPropertyUtil.getBoolean("io.netty.channel.epoll.ipMulticastAll", false);
private static final ChannelMetadata METADATA = new ChannelMetadata(true, 16);
private static final String EXPECTED_TYPES =
" (expected: " + StringUtil.simpleClassName(DatagramPacket.class) + ", " +
StringUtil.simpleClassName(AddressedEnvelope.class) + '<' +
StringUtil.simpleClassName(ByteBuf.class) + ", " +
StringUtil.simpleClassName(InetSocketAddress.class) + ">, " +
StringUtil.simpleClassName(ByteBuf.class) + ')';
private final EpollDatagramChannelConfig config;
private volatile boolean connected;
static {
if (logger.isDebugEnabled()) {
logger.debug("-Dio.netty.channel.epoll.ipMulticastAll: {}", IP_MULTICAST_ALL);
}
}
/**
* Returns {@code true} if {@link io.netty.channel.unix.SegmentedDatagramPacket} is supported natively.
*
* @return {@code true} if supported, {@code false} otherwise.
*/
public static boolean isSegmentedDatagramPacketSupported() {
return Epoll.isAvailable() &&
// We only support it together with sendmmsg(...)
Native.IS_SUPPORTING_SENDMMSG && Native.IS_SUPPORTING_UDP_SEGMENT;
}
/**
* Create a new instance which selects the {@link SocketProtocolFamily} to use depending
* on the Operation Systems default which will be chosen.
*/
public EpollDatagramChannel() {
this((SocketProtocolFamily) null);
}
/**
* Create a new instance using the given {@link InternetProtocolFamily}. If {@code null} is used it will depend
* on the Operation Systems default which will be chosen.
*
* @deprecated use {@link EpollDatagramChannel#EpollDatagramChannel(SocketProtocolFamily)}
*/
@Deprecated
public EpollDatagramChannel(InternetProtocolFamily family) {
this(newSocketDgram(family), false);
}
/**
* Create a new instance using the given {@link SocketProtocolFamily}. If {@code null} is used it will depend
* on the Operation Systems default which will be chosen.
*/
public EpollDatagramChannel(SocketProtocolFamily family) {
this(newSocketDgram(family), false);
}
/**
* Create a new instance which selects the {@link SocketProtocolFamily} to use depending
* on the Operation Systems default which will be chosen.
*/
public EpollDatagramChannel(int fd) {
this(new LinuxSocket(fd), true);
}
private EpollDatagramChannel(LinuxSocket fd, boolean active) {
super(null, fd, active, EpollIoOps.valueOf(0));
// Configure IP_MULTICAST_ALL - disable by default to match the behaviour of NIO.
try {
fd.setIpMulticastAll(IP_MULTICAST_ALL);
} catch (IOException | ChannelException e) {
logger.debug("Failed to set IP_MULTICAST_ALL to {}", IP_MULTICAST_ALL, e);
}
config = new EpollDatagramChannelConfig(this);
}
@Override
Source
Frequently Asked Questions
What is the EpollDatagramChannel class?
EpollDatagramChannel is a class in the netty codebase, defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollDatagramChannel.java.
Where is EpollDatagramChannel defined?
EpollDatagramChannel is defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollDatagramChannel.java at line 61.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free