actionscript 3 - Can't connect to host using rtmfp -
i have p2p game using adobe's rtmfp protocol , cirrus server. seems working fine when seek in stand lone flash player, when embed game web page, nobody can't connect game. there no errors, connection timeouts after while.
here how create netconnection on host:
netconnection = new netconnection(); netconnection.maxpeerconnections = 20; netconnection.addeventlistener(netstatusevent.net_status, onnetstatus); netconnection.connect("rtmfp://p2p.rtmfp.net/3a34e[redacted]af45f80/"); public function onnetstatus(event:netstatusevent) : void { var peer:p2pnetpeer = null; switch(event.info.code) { case "netconnection.connect.success": streamout = new netstream(netconnection, netstream.direct_connections); streamout.client = {onpeerconnect:onpeerconnect}; streamout.publish(netconnection.nearid); break; } it's same on client side, except when netconnection.connect.success create instream:
streamin = new netstream(netconnection, farid); streamin.client = {msg:onmessagereceived}; streamin.addeventlistener(netstatusevent.net_status, oninstreamstatus, false, 0, true); streamin.play(farid); this instream 1 causes problem, never connects host specified farid (i pair players , exchange near/farids using own server) if game run web page. when run locally using stand lone player, connects immediatelly.
i checking other states , errors well, not of import here (as said, not getting errors, timeout after while)
any thought might going on here?
actionscript-3 rtmfp cirrus
No comments:
Post a Comment