Home / Function/ testReceiveAnnounce() — netty Function Reference

testReceiveAnnounce() — netty Function Reference

Architecture documentation for the testReceiveAnnounce() function in RtspDecoderTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  40eb6c42_582b_8652_84c7_7c7dd5921b79["testReceiveAnnounce()"]
  1d9c05eb_1ffe_25b5_ab70_ce0e4a2da2ea["RtspDecoderTest"]
  40eb6c42_582b_8652_84c7_7c7dd5921b79 -->|defined in| 1d9c05eb_1ffe_25b5_ab70_ce0e4a2da2ea
  style 40eb6c42_582b_8652_84c7_7c7dd5921b79 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http/src/test/java/io/netty/handler/codec/rtsp/RtspDecoderTest.java lines 41–71

    @Test
    public void testReceiveAnnounce() {
        byte[] data1 = ("ANNOUNCE rtsp://172.20.184.218:554/d3abaaa7-65f2-"
                      + "42b4-8d6b-379f492fcf0f RTSP/1.0\r\n"
                      + "CSeq: 2\r\n"
                      + "Session: 2777476816092819869\r\n"
                      + "x-notice: 5402 \"Session Terminated by Server\" "
                      + "event-date=20150514T075303Z\r\n"
                      + "Range: npt=0\r\n\r\n").getBytes();

        byte[] data2 = ("RTSP/1.0 200 OK\r\n" +
                        "Server: Orbit2x\r\n" +
                        "CSeq: 172\r\n" +
                        "Session: 2547019973447939919\r\n" +
                        "\r\n").getBytes();

        EmbeddedChannel ch = new EmbeddedChannel(new RtspDecoder(),
                                            new HttpObjectAggregator(1048576));
        ch.writeInbound(Unpooled.wrappedBuffer(data1),
                        Unpooled.wrappedBuffer(data2));

        HttpObject res1 = ch.readInbound();
        assertNotNull(res1);
        assertTrue(res1 instanceof FullHttpRequest);
        ((FullHttpRequest) res1).release();

        HttpObject res2 = ch.readInbound();
        assertNotNull(res2);
        assertTrue(res2 instanceof FullHttpResponse);
        ((FullHttpResponse) res2).release();
    }

Domain

Subdomains

Frequently Asked Questions

What does testReceiveAnnounce() do?
testReceiveAnnounce() is a function in the netty codebase, defined in codec-http/src/test/java/io/netty/handler/codec/rtsp/RtspDecoderTest.java.
Where is testReceiveAnnounce() defined?
testReceiveAnnounce() is defined in codec-http/src/test/java/io/netty/handler/codec/rtsp/RtspDecoderTest.java at line 41.

Analyze Your Own Codebase

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

Try Supermodel Free