I've been trying to establish a connection between my flash client and java server for a few days now, but having trouble with the socket policy server.
I've read a lot of info online (including the Adobe guide on how to create one) but still I can't get it to connect, other than in the "Test Movie" option in CS3.
The source for the client and server are pretty long, so I will just try to explain what they do.
OK, so basically I receive the request for <policy-file-request/>
in my java server, then I send "<cross-domain-policy><allow-access-from domain='*' to-ports='*' /></cross-domain-policy>
" (tried numerous other xml files) followed by a null character (but keep the connection open, have tried closing it - still didn't work). It seems, however, that the flash client still continues trying to connect for about 10 seconds before giving up.
I also set up a mini-web server inside the java server, which serves a web page on the same port when issued an http-style request, and this seems to work, so it can't be a port-forwarding issue.
I also tried the Adobe example port 843 server, which still didn't work. When accessing the html file in firefox/safari, I can manually approve the connection, and it works.
I read that a crossdomain.xml isn't required for a socket connection, but have experimented none the less.
Where do you think I could be going wrong here?