Home / Function/ DatagramChannelConfig() — netty Function Reference

DatagramChannelConfig() — netty Function Reference

Architecture documentation for the DatagramChannelConfig() function in DefaultDatagramChannelConfig.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  bb275c64_c261_023a_b1e3_61b8958aa531["DatagramChannelConfig()"]
  9c64cb0f_e8ca_4019_9deb_ea45fc3cf75b["DefaultDatagramChannelConfig"]
  bb275c64_c261_023a_b1e3_61b8958aa531 -->|defined in| 9c64cb0f_e8ca_4019_9deb_ea45fc3cf75b
  style bb275c64_c261_023a_b1e3_61b8958aa531 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/socket/DefaultDatagramChannelConfig.java lines 156–177

    @Override
    public DatagramChannelConfig setBroadcast(boolean broadcast) {
        try {
            // See: https://github.com/netty/netty/issues/576
            if (broadcast &&
                !javaSocket.getLocalAddress().isAnyLocalAddress() &&
                !PlatformDependent.isWindows() && !PlatformDependent.maybeSuperUser()) {
                // Warn a user about the fact that a non-root user can't receive a
                // broadcast packet on *nix if the socket is bound on non-wildcard address.
                logger.warn(
                        "A non-root user can't receive a broadcast packet if the socket " +
                        "is not bound to a wildcard address; setting the SO_BROADCAST flag " +
                        "anyway as requested on the socket which is bound to " +
                        javaSocket.getLocalSocketAddress() + '.');
            }

            javaSocket.setBroadcast(broadcast);
        } catch (SocketException e) {
            throw new ChannelException(e);
        }
        return this;
    }

Domain

Subdomains

Frequently Asked Questions

What does DatagramChannelConfig() do?
DatagramChannelConfig() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/socket/DefaultDatagramChannelConfig.java.
Where is DatagramChannelConfig() defined?
DatagramChannelConfig() is defined in transport/src/main/java/io/netty/channel/socket/DefaultDatagramChannelConfig.java at line 156.

Analyze Your Own Codebase

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

Try Supermodel Free