testSctpInitMaxstreams() — netty Function Reference
Architecture documentation for the testSctpInitMaxstreams() function in SctpLimitStreamsTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 45dcd3b1_29eb_db0b_1477_4708ebd29114["testSctpInitMaxstreams()"] 7043bbe2_d1e5_54a7_ebdb_152b39688a90["SctpLimitStreamsTest"] 45dcd3b1_29eb_db0b_1477_4708ebd29114 -->|defined in| 7043bbe2_d1e5_54a7_ebdb_152b39688a90 a5ff5be1_7448_5ff7_3dff_ab27a212825b["serverClass()"] 45dcd3b1_29eb_db0b_1477_4708ebd29114 -->|calls| a5ff5be1_7448_5ff7_3dff_ab27a212825b e5490020_3822_091b_0f3e_2b6a0a01404b["clientClass()"] 45dcd3b1_29eb_db0b_1477_4708ebd29114 -->|calls| e5490020_3822_091b_0f3e_2b6a0a01404b style 45dcd3b1_29eb_db0b_1477_4708ebd29114 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-sctp/src/test/java/io/netty/channel/sctp/SctpLimitStreamsTest.java lines 44–77
@SuppressForbidden(reason = "test-only")
@Test
@Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
public void testSctpInitMaxstreams() throws Exception {
EventLoopGroup loop = newEventLoopGroup();
try {
ServerBootstrap serverBootstrap = new ServerBootstrap();
serverBootstrap.group(loop)
.channel(serverClass())
.option(ChannelOption.SO_REUSEADDR, true)
.option(SctpChannelOption.SCTP_INIT_MAXSTREAMS,
SctpStandardSocketOptions.InitMaxStreams.create(1, 1))
.localAddress(new InetSocketAddress(0))
.childHandler(new ChannelInboundHandlerAdapter());
Bootstrap clientBootstrap = new Bootstrap()
.group(loop)
.channel(clientClass())
.option(SctpChannelOption.SCTP_INIT_MAXSTREAMS,
SctpStandardSocketOptions.InitMaxStreams.create(112, 112))
.handler(new ChannelInboundHandlerAdapter());
Channel serverChannel = serverBootstrap.bind()
.syncUninterruptibly().channel();
SctpChannel clientChannel = (SctpChannel) clientBootstrap.connect(serverChannel.localAddress())
.syncUninterruptibly().channel();
assertEquals(1, clientChannel.association().maxOutboundStreams());
assertEquals(1, clientChannel.association().maxInboundStreams());
serverChannel.close().syncUninterruptibly();
clientChannel.close().syncUninterruptibly();
} finally {
loop.shutdownGracefully();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testSctpInitMaxstreams() do?
testSctpInitMaxstreams() is a function in the netty codebase, defined in transport-sctp/src/test/java/io/netty/channel/sctp/SctpLimitStreamsTest.java.
Where is testSctpInitMaxstreams() defined?
testSctpInitMaxstreams() is defined in transport-sctp/src/test/java/io/netty/channel/sctp/SctpLimitStreamsTest.java at line 44.
What does testSctpInitMaxstreams() call?
testSctpInitMaxstreams() calls 2 function(s): clientClass, serverClass.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free