var conn:NetConnection = new NetConnection("rtmfp://stratus.adobe.com/" + developerKey);
conn.nearID, my p2p id
new NetStream(netConnection, NetStream.DIRECT_CONNECTIONS);
NetStream.DIRECT_CONNECTIONS, wait for other peer
peer id, connect to other peer which has publish as NetStream.DIRECT_CONNECTIONS
Defined at NetStream
public function onPeerConnect(subscriber:NetStream):Boolean
Use to get notify when another client connects
public function send(handlerName:String, ... arguments):void
Sends a message on a published stream to all subscribing clients. refer to the client property
本文介绍了使用 RTMFP 协议进行点对点直播连接的方法,包括 NetConnection 和 NetStream 的创建过程,以及如何通过 onPeerConnect 方法监听客户端连接事件。
2317

被折叠的 条评论
为什么被折叠?



