RtspEncoderTest.java — netty Source File
Architecture documentation for RtspEncoderTest.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2015 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.handler.codec.rtsp;
import io.netty.buffer.ByteBuf;
import io.netty.channel.embedded.EmbeddedChannel;
import io.netty.handler.codec.http.DefaultFullHttpRequest;
import io.netty.handler.codec.http.DefaultFullHttpResponse;
import io.netty.handler.codec.http.DefaultHttpRequest;
import io.netty.handler.codec.http.DefaultHttpResponse;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.FullHttpResponse;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.util.CharsetUtil;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Test cases for RTSP encoder.
*/
public class RtspEncoderTest {
/**
* Test of a SETUP request, with no body.
*/
@Test
public void testSendSetupRequest() {
String expected = "SETUP rtsp://172.10.20.30:554/d3abaaa7-65f2-42b4-"
+ "8d6b-379f492fcf0f RTSP/1.0\r\n"
+ "transport: MP2T/DVBC/UDP;unicast;client=01234567;"
+ "source=172.10.20.30;"
+ "destination=1.1.1.1;client_port=6922\r\n"
+ "cseq: 1\r\n"
+ "\r\n";
HttpRequest request = new DefaultHttpRequest(RtspVersions.RTSP_1_0,
RtspMethods.SETUP,
"rtsp://172.10.20.30:554/d3abaaa7-65f2-42b4-8d6b-379f492fcf0f");
request.headers().add(RtspHeaderNames.TRANSPORT,
"MP2T/DVBC/UDP;unicast;client=01234567;source=172.10.20.30;" +
"destination=1.1.1.1;client_port=6922");
request.headers().add(RtspHeaderNames.CSEQ, "1");
EmbeddedChannel ch = new EmbeddedChannel(new RtspEncoder());
ch.writeOutbound(request);
// ... (114 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does RtspEncoderTest.java do?
RtspEncoderTest.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Allocators subdomain.
Where is RtspEncoderTest.java in the architecture?
RtspEncoderTest.java is located at codec-http/src/test/java/io/netty/handler/codec/rtsp/RtspEncoderTest.java (domain: Buffer, subdomain: Allocators, directory: codec-http/src/test/java/io/netty/handler/codec/rtsp).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free