0
votes

I have an app that is trying to open a secure socket connection on a web server. I hosted a small code that servers the policy file on port 843 as is required by flash player in order to make the socket connection. But i am not receiving the specified string <policy-file-request/>, in place of it i am getting the first string that is sent to port 443 during secure socket connection.

This flash socket policy server is taking more time than actual development process. Please shed some light.

2
do i need to send the <policy-file-request/> specifically or flash player does it on its own ? - intoTHEwild
No you don't need to send it yourself, Flash Player will send it automatically. I noticed however that it won't send the string unless I'm running the Flash from a browser. At least it won't send it from the stand-alone debug player. - Bakapii
I am running it in the browser itself. tried everything IE, chrome, firefox but nothing worked - intoTHEwild
Just opening the SWF in the browser or via a webserver? - Bakapii

2 Answers

0
votes

Before calling connect on a Socket-object, I make this call:

Security.loadPolicyFile("xmlsocket://" + ip + ":" + port);

As I mentioned in my comment it doesn't seem to reply anything, or even send the , if I run the SWF in a FlashPlayer. But I am able to connect via socket anyway. This is not the case if I run it on a webserver however. Then it will correctly trigger a response from the SocketServer that handles PolicyRequests.

0
votes

it looks like in order to serve a policy file to secure socket you have to open secure socket on server side, a normal tcp socket wont help. Although i still have no idea why do we have to serve the policy file over SSL, it's just a way to check if the connection is allowed. anyway if you are stuck go ahead and implement a secure socket on server side.