Hi experts!

I am testing Socket class with localTrusted sandbox.

I am connection to the server that is not respond. When I get
IO_ERROR, I remove listener and the reference to the Socket. In some
socket timout, I get the following error:

Error #2044: Unhandled securityError:. text=Error #2048: Security
sandbox violation: test.swf cannot load data from 93.84.217.161:0.

It is not clear for me at all, why removing listener and reference to
the socket, flex core (socket core, socket lib, do not know how to
name), having reference to the socket, wants to call SECURITY_ERROR
handler.

Here is my simple code. Test not fails, but in about 10 seconds I get
the error.

public class SocketTest extends TestCase
{
        private var sock:Socket;
        private function ioErrorHandler(event:Event):void
        {
                sock.removeEventListener(IOErrorEvent.IO_ERROR,
ioErrorHandler);
                sock = null;
        }
        public function testRequestHomePage():void
        {
                Alert.show(Security.sandboxType);
                sock = new Socket();
                sock.addEventListener(IOErrorEvent.IO_ERROR, addAsync
(ioErrorHandler, 2000),false,0,true);
            sock.connect('93.84.217.161', 0);
        }
}

PS. It does not metter I use week or strong reference. I will get the
same error if I remove ',false,0,true' in addEventListener.

Thanks

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to