CRtmpserver协议链(protocol)
来源:互联网 发布:seo三大标签 编辑:程序博客网 时间:2024/06/07 23:38
经过一段研究,对CRtmpserver 中的Protocol一直不知云云。尤其其中的FarProtocol和NearProtocol的概念。
下面是官方的解释:
The I/O is made as follows:
+---+ +----+ +----+ +----+ +----+ +----+
| T |<--->| P1 |<--->| P2|<--->| P3 |<---> ** <--->| Pn |<--->| CS |
*---+ *----+ *----+ *----+ *----+ *----+
T -Transport level. At this level we store the inbound data into a buffer
or send the data from the output buffer. This layer may or may not
have a IOHandler attached. This give us the possibility of having
stateless communication like a chain of protocols in which HTTP is
the edge protocol with the outside world. Basically, this layer
will do I/O whenever a carrier is available.
P1 to Pn - Protocol levels. At this levelswe do packing/unpacking of the
data provided either by the transport level or by the previous
protocol. This way we can stack multiple protocol on top of each
other. For example we could have RTMP over HTTP, or RTMP over some
kind of compressing protocol over base64 over HTTP
CS - Connection state. At this level we dothe business logic of the connection.
All the data passed in and out of this level is translated relative tothe
business logic of the connection. For example in a RTMP connection this
layer will receive only RTMP messages.
Below we have some possible chains ofprotocols:
1. TCP <--> HTTP <--> XMLRPC<--> Application Server State
2. TCP <--> RTMP <--> RTMPConnection State
3. TCP <--> HTTP <--> RTMP<--> RTMP Connection State
4. TCP <--> Encription <-->RTMP <--> RTMP Connection State
5. TCP <--> HTTP <-->Encription <--> RTMP <--> RTMP Connection State
以下个人理解:
T -传输层协议,主要是存储数据或读取数据从缓存中。最接近IO操作的。这一层相于P1来说就是FarProtocol;
P1 to Pn -其实是逻辑处理层,主要处理媒体,加密,http相关的协议。其p1是T的NearProtocol,P2是P1的NearProtocol ,p1是p2的FarProtocol依次类推,越往后的协议,越接近上层逻辑。
CS -也是逻辑层,主要处理连接状态
创建协议链是在ProtocolFactoryManager::CreateProtocolChain里面可以处理的。
配置文件中配的协议去解析协议链的地方是DefaultProtocolFactory::ResolveProtocolChain
看着两个函数的处理,就能理解官方的解释了。
- CRtmpserver协议链(protocol)
- crtmpserver的协议架构
- Swift协议(Protocol)
- 协议(Protocol)
- OC Protocol(协议)
- Swift - 协议(protocol)
- Swift - 协议(protocol)
- Protocol(协议)
- crtmpserver基本架构(协议和服务对应关系)
- IP协议(Internet Protocol)
- 协议(Protocol)的用法
- Objective-C 协议(protocol)
- Internet协议(Internet Protocol)
- 时间协议(Time Protocol)
- Objective-C 协议(protocol)
- 17、OC 协议(protocol)
- OC之Protocol(协议)
- object-c协议(protocol)
- this is often breadth players low cost cheap cabal 2 alz
- 如何关闭AlertDialog.Builder对话框
- 线程安全与并发安全探究(三)--servlet多线程并发问题
- iOS项目的重命名方法完整图文教程
- IOS 动态隐藏状态栏
- CRtmpserver协议链(protocol)
- MySQL Cluster初步学习资料整理--安装部署新特性性能测试等
- jQuery UI vs EasyUI
- SQL
- PS人物头发抠取教程 PS照片换背景方法
- 安装CocoaPods命令
- centos6.5安装gcc4.9.2
- 文档元数据base link meta元素
- Java--垃圾回收