Lately, many users on my online game has told me that they have connection problems.
Either it says “Error 2048” (which in Flash is known as: Security sandbox violation: _ cannot load data from _.), which I guess means that the Policy-file could not be loaded or that the policy-file is incorrect. Sometimes it also says “Connection timed out”, when either the server does not respond in time (rarely) or the client fails to connect to server for some reason (could also be related to policy-files I guess).
The policy-file-server is hosted on the same port as the rest of the game server. Upon <policy-file-request> transmission, this is sent in return:
<cross-domain-policy>
<allow-access-from domain=“mfe.zomis.net” to-ports=“8080” />
</cross-domain-policy>
I had to change the port from 35274 to 8080 in order to let everyone with outgoing firewalls connect to my game.
So now I wonder, is there anything I can do to improve the XMLSockets connection?
I am doing a call to
Security.loadPolicyFile(“xmlsocket://” + netplay.addr + “:” + netplay.port);
when my game loads, not sure if this has made the situation better or worse.
Any other tips?