testSend200OkResponseWithBody() — netty Function Reference
Architecture documentation for the testSend200OkResponseWithBody() function in RtspEncoderTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a4064da9_b0fe_49af_2408_d3ecb344dc0f["testSend200OkResponseWithBody()"] 5a20be0b_00db_ad17_3f71_aa64a206ddc3["RtspEncoderTest"] a4064da9_b0fe_49af_2408_d3ecb344dc0f -->|defined in| 5a20be0b_00db_ad17_3f71_aa64a206ddc3 style a4064da9_b0fe_49af_2408_d3ecb344dc0f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/test/java/io/netty/handler/codec/rtsp/RtspEncoderTest.java lines 136–172
@Test
public void testSend200OkResponseWithBody() {
String expected = "RTSP/1.0 200 OK\r\n"
+ "server: Testserver\r\n"
+ "session: 2547019973447939919\r\n"
+ "content-type: text/parameters\r\n"
+ "content-length: 50\r\n"
+ "cseq: 3\r\n"
+ "\r\n"
+ "position: 24\r\n"
+ "stream_state: playing\r\n"
+ "scale: 1.00\r\n";
byte[] content = ("position: 24\r\n"
+ "stream_state: playing\r\n"
+ "scale: 1.00\r\n").getBytes(CharsetUtil.UTF_8);
FullHttpResponse response =
new DefaultFullHttpResponse(RtspVersions.RTSP_1_0,
RtspResponseStatuses.OK);
response.headers().add(RtspHeaderNames.SERVER, "Testserver");
response.headers().add(RtspHeaderNames.SESSION, "2547019973447939919");
response.headers().add(RtspHeaderNames.CONTENT_TYPE,
"text/parameters");
response.headers().add(RtspHeaderNames.CONTENT_LENGTH,
"" + content.length);
response.headers().add(RtspHeaderNames.CSEQ, "3");
response.content().writeBytes(content);
EmbeddedChannel ch = new EmbeddedChannel(new RtspEncoder());
ch.writeOutbound(response);
ByteBuf buf = ch.readOutbound();
String actual = buf.toString(CharsetUtil.UTF_8);
buf.release();
assertEquals(expected, actual);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testSend200OkResponseWithBody() do?
testSend200OkResponseWithBody() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/rtsp/RtspEncoderTest.java.
Where is testSend200OkResponseWithBody() defined?
testSend200OkResponseWithBody() is defined in codec-http/src/test/java/io/netty/handler/codec/rtsp/RtspEncoderTest.java at line 136.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free