Home / Function/ setOption() — netty Function Reference

setOption() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  0b125d12_7be1_50bb_efcc_966c0f640d22["setOption()"]
  f9498616_1338_efe9_d27b_38c8a37a3a64["EpollChannelConfig"]
  0b125d12_7be1_50bb_efcc_966c0f640d22 -->|defined in| f9498616_1338_efe9_d27b_38c8a37a3a64
  style 0b125d12_7be1_50bb_efcc_966c0f640d22 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollChannelConfig.java lines 91–113

    @Override
    public <T> boolean setOption(ChannelOption<T> option, T value) {
        validate(option, value);
        if (option == EpollChannelOption.EPOLL_MODE) {
            setEpollMode((EpollMode) value);
        } else {
            try {
                if (option instanceof IntegerUnixChannelOption) {
                    IntegerUnixChannelOption opt = (IntegerUnixChannelOption) option;
                    ((AbstractEpollChannel) channel).socket.setIntOpt(opt.level(), opt.optname(), (Integer) value);
                    return true;
                } else if (option instanceof RawUnixChannelOption) {
                    RawUnixChannelOption opt = (RawUnixChannelOption) option;
                    ((AbstractEpollChannel) channel).socket.setRawOpt(opt.level(), opt.optname(), (ByteBuffer) value);
                    return true;
                }
            } catch (IOException e) {
                throw new ChannelException(e);
            }
            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-epoll/src/main/java/io/netty/channel/epoll/EpollChannelConfig.java.
Where is setOption() defined?
setOption() is defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollChannelConfig.java at line 91.

Analyze Your Own Codebase

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

Try Supermodel Free