无法使用rtmfp连接到服务器
Can't connect to server using rtmfp
如何使用 rtmfp 连接到我的服务器?
我能做到:
var test:NetConnection = new NetConnection();
trace('trying to connect');
test.connect("rtmp://[server]/chat");
test.addEventListener(NetStatusEvent.NET_STATUS,function(event:NetStatusEvent):void {
trace(event.info.code);
});
并得到NetConnection.Connect.Success
但是当我这样做时:
var test:NetConnection = new NetConnection();
trace('trying to connect');
test.connect("rtmfp://[server]/chat");
test.addEventListener(NetStatusEvent.NET_STATUS,function(event:NetStatusEvent):void {
trace(event.info.code);
});
时间长了就失效了
我正在连接到我自己的 Adobe Media Server v.5.0.3。所有 TCP 和 UDP 端口都打开。
RTMFP enable
在 [ams root]\conf\_defaultRoot_\Adaptor.xml
中设置为 true
http://cc.rtmfp.net/ 还给我:
- 没有
- 是
- 是
- 没有
- 没有
- 是
- 是
- 是
您的示例没有理由不起作用。也许您配置有误,或者您的防火墙阻止了 UDP 端口。
如果您调用以下命令,您是否看到 "Adobe Media Server" 在端口 1935 上侦听:
netstat -a -b -p UDP
为什么不尝试 MonaServer? It works without configuration and it's an open source project. Here is a chat sample 使用 RTMFP 或 WebSocket。
如何使用 rtmfp 连接到我的服务器?
我能做到:
var test:NetConnection = new NetConnection();
trace('trying to connect');
test.connect("rtmp://[server]/chat");
test.addEventListener(NetStatusEvent.NET_STATUS,function(event:NetStatusEvent):void {
trace(event.info.code);
});
并得到NetConnection.Connect.Success
但是当我这样做时:
var test:NetConnection = new NetConnection();
trace('trying to connect');
test.connect("rtmfp://[server]/chat");
test.addEventListener(NetStatusEvent.NET_STATUS,function(event:NetStatusEvent):void {
trace(event.info.code);
});
时间长了就失效了
我正在连接到我自己的 Adobe Media Server v.5.0.3。所有 TCP 和 UDP 端口都打开。
RTMFP enable
在 [ams root]\conf\_defaultRoot_\Adaptor.xml
true
http://cc.rtmfp.net/ 还给我:
- 没有
- 是
- 是
- 没有
- 没有
- 是
- 是
- 是
您的示例没有理由不起作用。也许您配置有误,或者您的防火墙阻止了 UDP 端口。
如果您调用以下命令,您是否看到 "Adobe Media Server" 在端口 1935 上侦听:
netstat -a -b -p UDP
为什么不尝试 MonaServer? It works without configuration and it's an open source project. Here is a chat sample 使用 RTMFP 或 WebSocket。