Socket IOErrorEvent.IO_ERROR. , , , . , , , - ( ):
var mySocket = new Socket();
mySocket.addEventListener(IOErrorEvent.IO_ERROR, function(event:IOErrorEvent):void {
trace("ioErrorHandler: " + event);
});
mySocket.addEventListener(flash.events.Event.CONNECT, function(event:Event):void {
});
mySocket.connect( 'server.example.com', 80 );
. -. " ", IO Error .
- , . /, , " ". , ( Flash) , . - , IOErrorEvent.IO_ERROR, .
- , (~ 20-30 ). Socket.timeout Flash Player 10 Air 1.0. , - ActionScript Flash Player 10.
!
--- EDIT: , ---
, - ( ) . , , . Adobe:
XML , , SWF. , :
This means that if you have not previously downloaded the policy file using Security.loadPolicyFile(), when you first try to connect your socket to the server, first try to run the policy file. In some cases, this can lead to strange connection delays or other unexpected behavior. If you think you might run into this problem, you should start by adding a listener for flash.events.SecurityErrorEvent.SECURITY_ERROR.
source
share