RTMP协议之三次握手
注:本文引用的原文内容均摘自 http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/rtmp/pdf/rtmp_specification_1.0.pdf
简介(Introduction)
【原文】
Adobe’s Real Time Messaging Protocol (RTMP) provides a bidirectional message multiplex service over a reliable stream transport, such as TCP [RFC0793], intended to carry parallel streams of video, audio, and data messages, with associated timing information, between a pair of communicating peers. Implementations typically assign different priorities to different classes of messages, which can effect the order in which messages are enqueued to the underlying stream transport when transport capacity is constrained.
This memo describes the syntax and operation of the Real Time Messaging Protocol.
【译文】
Adobe 的 Real Time Messaging Protocol(Real Time Messaging Protocol, RTMP)通过可靠的流传输(如TCP [RFC0793])提供双向消息多路复用服务,用于在一对通信对等点之间传输具有相关计时信息的并行视频流、音频和数据消息。实现通常为不同的消息类分配不同的优先级,从而在传输带宽受限时可以影响消息在底层流传输通道的入队顺序。
本文描述了实时消息传递协议的语法和操作。
握手(Handshake)
【原文】
An RTMP connection begins with a handshake. The handshake is unlike the rest of the protocol; it consists of three static-sized chunks rather than consisting of variable-sized chunks with headers. The client (the endpoint that has initiated the connection) and the server each send the same three chunks. For exposition, these chunks will be designated C0, C1, and C2 when sent by the client; S0, S1, and S2 when sent by the server.
【译文】
RTMP连接从握手开始。握手不同于协议的其他部分;它由三个固定大小的块组成,而不是由带有头的可变大小的块组成。客户端(发起连接的一端)和服务器都发送相同的三个块。为了便于说明,当客户端发送时,这些块将被指定为C0、C1和C2;当服务器发送时,这些块被指定为S0、S1和S2。