I have a Flex client using a binary (TCP) Flash socket to communicate with a Java server. I have a localhost server (Apache) that provides a crossdomain.xml file that is wide open only during testing.
My code successfully loads the policy file at startup.
Then I will connect the socket to the server without any problems and send a message and get a response. All is good so far.
However, when I send a second message through the same socket, I get a pause of about 12 seconds, and then an error with an error in the sandbox:
Security Error: Error #2048: Security sandbox violation: file:///C:/apache_root/ttt1/ttt1.swf cannot load data from localhost:45455.
This is the same port and socket through which the first message was obtained.
I tried to reload the policy file before each submission, but I get the same result.
Any idea why this might happen? I obviously have an open outlet at one point. I soak the socket after each send, and I tried to do it after each read, but the same result.
Thanks in advance
EDIT:
If I recreate the socket before each call, my code works. I'm struggling to believe this is correct, but maybe there is a Socket parameter that I am missing.
Simon source share