title: Sandbox violation on second socket send
body: <p>I have a Flex client using a Flash binary (TCP) socket for communication with a Java server.  I have a localhost (Apache) server providing a crossdomain.xml file which is wide open just while I am testing.</p>
  
  <p>My code successfully loads the policy file on startup.</p>
  
  <p>I then connect the socket to the server without any difficulty and send a message and get a response.  All good so far.  </p>
  
  <p>However, when I send a second message through the same socket I get a pause of about 12 seconds then a sandbox violation error:</p>
  
  <p><code>Security Error: Error #2048: Security sandbox violation: file:///C:/apache_root/ttt1/ttt1.swf cannot load data from localhost:45455.</code></p>
  
  <p>This is the same port and socket through which the first message succeeded. </p>
  
  <p>I tried re-loading the policy file before every send, but I get the same result.  </p>
  
  <p>Any idea why this might be happening?  I clearly have an open socket at one point.  I am flushing the socket after each send and I tried doing that after each read as well, but the same result.</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>EDIT:</strong><br>
  If I recreate the socket prior to every call my code works.  I am struggling to believe that this is correct, but maybe there is a Socket setting I am missing.</p>