TCP/RTMP握手

发布于 2024-11-30 07:13:04 字数 198 浏览 0 评论 0原文

我正在编写一个应用程序来(非正式地)替换 adobe air 中制作的客户端,他们使用 RTMP 作为连接协议,我必须创建自己的类来实现它:<

据我所知,RTMP属于TCP协议,但是我是否必须先建立TCP连接/握手,然后再进行RTMP握手?

或者 TCP 握手被忽略,TCP 标头仅用于传输 RTMP 握手/数据?

亲切的问候。

I'm writing an application to (unofficially) replace a client made in adobe air, they use RTMP as the connection protocol which i'll have to create my own class to implement it :<

RTMP as far as I know is placed under the TCP protocol, but do I have to establish a TCP connection /handshake first, followed by an RTMP handshake?

Or is the TCP handshake ignored and the TCP headers are just used to transport the RTMP handshake /data?

Kind regards.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

只为守护你 2024-12-07 07:13:04

您建立 TCP 连接,然后立即进行 RTMP 握手,即从发送 C0 开始,然后发送 S0、C1、S1、C2、S2。一旦收到后者,RTMP 握手就完成了。祝您使用 RTMP 好运,您将需要它。

You establish TCP connection and then you immediately proceed with RTMP handshake, i.e. you start with sending C0, then go S0, C1, S1, C2, S2. As soon as you receive the latter, RTMP handshake is complete. Good luck with RTMP, you will need it.

你是年少的欢喜 2024-12-07 07:13:04

哇,你那里有一个好项目。

正如您所建议的,RTMP 是基于 TCP 的。有趣的是,不仅控制命令而且媒体数据都是通过 TCP 发送的。与预期的使用 UDP 的 RTSP 不同。还有一些库可以完成您想要做的事情。我发现有趣的一个是用 php 编写的 - http://code.google.com/ p/php-rtmp-client/.

您还需要使用 AMF,它是编码 RTMP 命令的二进制格式。有一篇关于它的很好的维基百科文章和一些解析器,例如 AMFPHP

Wow, a good project you have there.

RTMP is over TCP as you suggested. The interesting thing is that not only control commands but also media data is sent over TCP. Unlike RTSP which uses UDP as expected. There are also libraries that do what you re trying to do. One that I found interesting is written in php - http://code.google.com/p/php-rtmp-client/.

You also need to work with AMF which is the binary format in which RTMP commands are encoded with. There is a good Wikipedia article about it and a few parsers out there like AMFPHP

半世晨晓 2024-12-07 07:13:04

如果有人像我一样在 Google 上偶然发现这个问题并寻找解决方案,我在 http://www.fluinefx 中找到了我的解决方案。 com/。无需担心握手或其他任何事情。一切都包装得很整齐:)

in case anyone stumbled over this on Google looking for a solution like I did, I found mine in http://www.fluorinefx.com/. No need to worry about handshakes or anything. It's all wrapped neatly :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文