[EDITED] This issue was originally described as my having trouble with Perl's Socket, but I have moved on now to where this is clearly a Flash security thing. However, I'm still stuck.
I have a flash client that attempts to connect to an open socket on the same host as the one on which it lives.
I am able to connect successfully from inside the Flash IDE, and when I run the swf movie locally on my machine, after granting it security clearance in the white list it connects as well. However, when I call the movie via the browser (http://mydomain/mymovie.swf) it fails to connect.
The socket reports that a connection attempt is made but immediately disconnects.
I have a crossdomain policy file that looks like this: in the root directory of the host.
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" to-ports="10005"/>
</cross-domain-policy>
(yes, the Socket is listening on that port).
In the flash movie I have a line that looks like this:
System.security.loadPolicyFile("XMLSocket://myDomain.com:80");
And I'm thinking maybe that's where the problem is, but the documentation on how to use this method is not entirely clear.
I'm in Flash CS3
All thoughts appreciated.