Red5 サーバーへの接続NetStatusEvent
に使用しているときに、時折、手に負えなくなることがあります。NetConnection
Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Call.Failed
これは私が接続している方法です(NetConnection.connect()
呼び出される唯一の場所):
public function Connect(callBack:Function = null):void
{
if (IsConnected())
{
if (callBack != null)
{
callBack.call();
}
}
else // Not connected
{
netConnect.addEventListener(NetStatusEvent.NET_STATUS, function(e:NetStatusEvent):void
{
// OnConnect called whenever there is a net status event
OnConnect(e, callBack);
netConnect.removeEventListener(NetStatusEvent.NET_STATUS, arguments.callee);
});
try
{
// Attempt to connect to Media Server
netConnect.connect(MEDIA_SERVER_URI, true);
}
catch(error:Error)
{
logger.LogError("NetConnection.connect threw an exception.", error);
}
}
}
のイベントリスナーを追加していNetStatusEvent.NET_STATUS
ます。リスナーが時々電話をかけてくる可能性があるのはどうしてですか?