Flash Sockets, Peer-to-Peer Capabilities

别说谁变了你拦得住时间么 提交于 2019-12-04 20:52:18
Alexander Farber

1) For socket policy take my Perl-script or the Apache module (both work well): http://code.google.com/p/mod-socket-policy/ - it will serve clients connecting to the port 843.

But this is not enough because of corporate users behind firewalls / proxies - who can't connect to port 843, so you need to add socket policy handling to your own server code too (i.e. respond to incoming <policy-file-request/>\0 requests).

2) For RTMFP - don't do it, because:

a) Cirrus is not an option, because it is beta and not for commercial use. Also it seems to be outdated by the FMS4, so how long before it's discontinued?

b) Flash Media Server 4 option is very expensive. For the enterprise version (required for RTMFP) Adobe doesn't even list the price publicly. Your only option is FMS4 for AWS, but it is expensive too: adobe media server 4 cost with amazon?

c) There is an OSS project for RTMFP, but it isn't ready yet: OpenRTMFP Cumulus

d) For some users RTMFP just doesn't work

So my suggestion is to go with RTMP/RTMPT which works for all users, incl. corporate ones and use Red5 for that: http://red5.org/

Red5 has no support for RTMFP. Prices for Flash Media Server you will get on the adobe webpage.

There is a technology on Adobe Labs called Cirrus. It's completely free and you won't need to have special servers running besides a regular one (php, ruby...) that will perform an initial handshake (a regular http request should do it).

So, if you have for ex. 2 players that want to play together, the first one gets his Cirrus-id, passes it to your server and that value is stored in a bank of "available players". When the second client connects, the servers checks the bank and returns that id to the second player, and vice-versa. Finally, two flash-player clients establish a direct connection via rtmfp. There's also an article that explains it all in more details.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!