setOption() — netty Function Reference
Architecture documentation for the setOption() function in NioChannelOption.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 1bbf3b43_e2cc_3eec_cd19_3396f96358d1["setOption()"] 5e76b03b_2ef8_0a9c_1166_be79b066b796["NioChannelOption"] 1bbf3b43_e2cc_3eec_cd19_3396f96358d1 -->|defined in| 5e76b03b_2ef8_0a9c_1166_be79b066b796 style 1bbf3b43_e2cc_3eec_cd19_3396f96358d1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/socket/nio/NioChannelOption.java lines 53–69
static <T> boolean setOption(Channel jdkChannel, NioChannelOption<T> option, T value) {
NetworkChannel channel = (NetworkChannel) jdkChannel;
if (!channel.supportedOptions().contains(option.option)) {
return false;
}
if (channel instanceof ServerSocketChannel && option.option == StandardSocketOptions.IP_TOS) {
// Skip IP_TOS as a workaround for a JDK bug:
// See https://mail.openjdk.java.net/pipermail/nio-dev/2018-August/005365.html
return false;
}
try {
channel.setOption(option.option, value);
return true;
} catch (IOException e) {
throw new ChannelException(e);
}
}
Domain
Subdomains
Source
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/nio/NioChannelOption.java.
Where is setOption() defined?
setOption() is defined in transport/src/main/java/io/netty/channel/socket/nio/NioChannelOption.java at line 53.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free