Home / Function/ setOption() — netty Function Reference

setOption() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  cce7cbd2_8cd1_9a45_0709_a4685a812781["setOption()"]
  9c64cb0f_e8ca_4019_9deb_ea45fc3cf75b["DefaultDatagramChannelConfig"]
  cce7cbd2_8cd1_9a45_0709_a4685a812781 -->|defined in| 9c64cb0f_e8ca_4019_9deb_ea45fc3cf75b
  1b869761_0ce0_5d48_4421_66d43e8f6458["setActiveOnOpen()"]
  cce7cbd2_8cd1_9a45_0709_a4685a812781 -->|calls| 1b869761_0ce0_5d48_4421_66d43e8f6458
  style cce7cbd2_8cd1_9a45_0709_a4685a812781 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/socket/DefaultDatagramChannelConfig.java lines 108–138

    @Override
    @SuppressWarnings("deprecation")
    public <T> boolean setOption(ChannelOption<T> option, T value) {
        validate(option, value);

        if (option == SO_BROADCAST) {
            setBroadcast((Boolean) value);
        } else if (option == SO_RCVBUF) {
            setReceiveBufferSize((Integer) value);
        } else if (option == SO_SNDBUF) {
            setSendBufferSize((Integer) value);
        } else if (option == SO_REUSEADDR) {
            setReuseAddress((Boolean) value);
        } else if (option == IP_MULTICAST_LOOP_DISABLED) {
            setLoopbackModeDisabled((Boolean) value);
        } else if (option == IP_MULTICAST_ADDR) {
            setInterface((InetAddress) value);
        } else if (option == IP_MULTICAST_IF) {
            setNetworkInterface((NetworkInterface) value);
        } else if (option == IP_MULTICAST_TTL) {
            setTimeToLive((Integer) value);
        } else if (option == IP_TOS) {
            setTrafficClass((Integer) value);
        } else if (option == DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION) {
            setActiveOnOpen((Boolean) value);
        } else {
            return super.setOption(option, value);
        }

        return true;
    }

Domain

Subdomains

Frequently Asked Questions

What does setOption() do?
setOption() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/socket/DefaultDatagramChannelConfig.java.
Where is setOption() defined?
setOption() is defined in transport/src/main/java/io/netty/channel/socket/DefaultDatagramChannelConfig.java at line 108.
What does setOption() call?
setOption() calls 1 function(s): setActiveOnOpen.

Analyze Your Own Codebase

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

Try Supermodel Free