Unable to connect to server using rtmfp

How to connect to my server using rtmfp?

I can do it:

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 does not work after a long time.

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

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

http://cc.rtmfp.net/ returns me:

  • no
  • Yes
  • Yes
  • no
  • no
  • Yes
  • Yes
  • Yes
+6
source share
1 answer

There is no reason for your sample to not work. You may be mistaken in some configuration or your firewall is blocking the UDP port.

You see that "Adobe Media Server" listens on port 1935 if you invoke the following command:

 netstat -a -b -p UDP 

Why don't you try MonaServer ? It works without configuration and is an open source project. The following is an example of a chat that works with RTMFP or WebSocket.

0
source

Source: https://habr.com/ru/post/981072/


All Articles