views:

151

answers:

1

I am trying to connect to a socket server from flex. I read, on adobe's documentation, the client automatically sends a "request-policy-file" xml element to the socket before allowing it to be opened, and should receive a policy file.

The client sends the xml element as expected, My server receives it (on the port I want to use, port 6104) and replies on the same port with:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"&gt;
<cross-domain-policy>
  <site-control permitted-cross-domain-policies="all"/>
  <allow-access-from domain="*" to-ports="*"/>
</cross-domain-policy>

To the best of my knowledge, this should be the most permissive policy available on a socket.

The flash player logs indicate a timeout looking for the socket policy file, although I know my socket returned the response immediately.

What should I do ?

A: 

Try using master-only.
Master-only is saying it's using one policy file as a master. "All" is saying, all domains need a policy file, so it will keep looking for policy files. Use his and see if you get a timeout.

Cross Domain Policy "master-only"

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"&gt;
<cross-domain-policy>
  <site-control permitted-cross-domain-policies="master-only"/>
  <allow-access-from domain="*" to-ports="*"/>
</cross-domain-policy>

Reference
http://jodieorourke.com/view.php?id=108&amp;blog=news

VideoDnd