简体   繁体   中英

Can't connect to server using rtmfp

How can I connect to my server using rtmfp?

I can do this:

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);
});

And get NetConnection.Connect.Success

But when I do this:

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);
});

It fails after a long time.

I'm connecting to my own Adobe Media Server v.5.0.3. All TCP and UDP ports are open.

RTMFP enable is set to true in [ams root]\\conf\\_defaultRoot_\\Adaptor.xml

http://cc.rtmfp.net/ gives me back:

  • no
  • yes
  • yes
  • no
  • no
  • yes
  • yes
  • yes

There is no reason for your sample to not work. Maybe you've mistaken some configuration or your firewall is blocking the UDP port.

Do you see "Adobe Media Server" listening on port 1935 if you call the following command :

netstat -a -b -p UDP

Why don't you try MonaServer ? It works without configuration and it's an open source project. Here is a chat sample working with RTMFP or WebSocket.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM