testRawOption() — netty Function Reference
Architecture documentation for the testRawOption() function in KQueueChannelConfigTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 980ad931_58af_48d0_a6eb_87454eb53591["testRawOption()"] f5c650c9_a464_cc61_c859_bf9e0f794480["KQueueChannelConfigTest"] 980ad931_58af_48d0_a6eb_87454eb53591 -->|defined in| f5c650c9_a464_cc61_c859_bf9e0f794480 style 980ad931_58af_48d0_a6eb_87454eb53591 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-native-kqueue/src/test/java/io/netty/channel/kqueue/KQueueChannelConfigTest.java lines 100–121
@Test
public void testRawOption() throws Exception {
KQueueSocketChannel channel = new KQueueSocketChannel();
// Value for SOL_SOCKET and SO_REUSEADDR
// See https://opensource.apple.com/source/xnu/xnu-201/bsd/sys/socket.h.auto.html
RawUnixChannelOption opt = new RawUnixChannelOption("RAW_OPT", 0xffff, 0x0004, 4);
CleanableDirectBuffer disabledCleanable = Buffer.allocateDirectBufferWithNativeOrder(4);
ByteBuffer disabled = disabledCleanable.buffer();
disabled.putInt(0).flip();
assertEquals(disabled, channel.config().getOption(opt));
CleanableDirectBuffer enabledCleanable = Buffer.allocateDirectBufferWithNativeOrder(4);
ByteBuffer enabled = enabledCleanable.buffer();
enabled.putInt(1).flip();
channel.config().setOption(opt, enabled);
assertNotEquals(disabled, channel.config().getOption(opt));
channel.fd().close();
disabledCleanable.clean();
enabledCleanable.clean();
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does testRawOption() do?
testRawOption() is a function in the netty codebase, defined in transport-native-kqueue/src/test/java/io/netty/channel/kqueue/KQueueChannelConfigTest.java.
Where is testRawOption() defined?
testRawOption() is defined in transport-native-kqueue/src/test/java/io/netty/channel/kqueue/KQueueChannelConfigTest.java at line 100.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free