Home / Function/ setOption() — netty Function Reference

setOption() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  2ed2bd55_b3e4_ee84_2672_46aea7656d2d["setOption()"]
  c726b6aa_58c3_c23e_8d70_411bf7bf32b9["KQueueSocketChannelConfig"]
  2ed2bd55_b3e4_ee84_2672_46aea7656d2d -->|defined in| c726b6aa_58c3_c23e_8d70_411bf7bf32b9
  74148e18_1ba1_a755_e2c7_76fdd133f65f["setSndLowAt()"]
  2ed2bd55_b3e4_ee84_2672_46aea7656d2d -->|calls| 74148e18_1ba1_a755_e2c7_76fdd133f65f
  8397cd92_4b29_0d3f_943b_a4104adadb0e["setTcpNoPush()"]
  2ed2bd55_b3e4_ee84_2672_46aea7656d2d -->|calls| 8397cd92_4b29_0d3f_943b_a4104adadb0e
  style 2ed2bd55_b3e4_ee84_2672_46aea7656d2d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/KQueueSocketChannelConfig.java lines 100–131

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

        if (option == SO_RCVBUF) {
            setReceiveBufferSize((Integer) value);
        } else if (option == SO_SNDBUF) {
            setSendBufferSize((Integer) value);
        } else if (option == TCP_NODELAY) {
            setTcpNoDelay((Boolean) value);
        } else if (option == SO_KEEPALIVE) {
            setKeepAlive((Boolean) value);
        } else if (option == SO_REUSEADDR) {
            setReuseAddress((Boolean) value);
        } else if (option == SO_LINGER) {
            setSoLinger((Integer) value);
        } else if (option == IP_TOS) {
            setTrafficClass((Integer) value);
        } else if (option == ALLOW_HALF_CLOSURE) {
            setAllowHalfClosure((Boolean) value);
        } else if (option == SO_SNDLOWAT) {
            setSndLowAt((Integer) value);
        } else if (option == TCP_NOPUSH) {
            setTcpNoPush((Boolean) value);
        } else if (option == ChannelOption.TCP_FASTOPEN_CONNECT) {
            setTcpFastOpenConnect((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-classes-kqueue/src/main/java/io/netty/channel/kqueue/KQueueSocketChannelConfig.java.
Where is setOption() defined?
setOption() is defined in transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/KQueueSocketChannelConfig.java at line 100.
What does setOption() call?
setOption() calls 2 function(s): setSndLowAt, setTcpNoPush.

Analyze Your Own Codebase

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

Try Supermodel Free