1

I am creating a real time application and have come across HTML5 web-socket which is the ideal technique over ajax long polling. But web-socket is not guaranteed to run in every browser. I tested with IE-8 and IE-9, it is not supported in those versions.

I found web-socket-js which seems to be a perfect fallback for the browser not supporting modern web-socket. It uses flash for to carry out the task. But since flash 9, flash application are now required with flash socket policy file to access port 843. I have researchd in this article setting up a flash socket policy but could not find a solution that works with Apache installed in windows. How should I create this policy file and where should I put it. I am very much confused.

1

1 Answer 1

0

A policy file dictates the hosts from where .swf files can access services on the server. A policy file server is a TCP server that hosts a master policy file (an XML document) on port 843. The Flash Player first attempts to access the master policy file on this port, but if it doesn't find the policy file, requests for the file on the port on which it is trying to fetch the data.

That means the Flash Player actually makes 2 network requests. One goes to port 843 by default. If that request times out (in 3 seconds) then it makes a second request to the port you are making a connection to (presuming it's port 80 in your case).

If I remember correctly, the request is made to the following URL -

hostname:port//crossdomain.xml

In your case, I think it might just be a matter of putting the master policy file in the root of your web server. Apache uses the DocumentRoot directive in the .conf file to identify this directory.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.