August 17th, 2011, 04:36 PM
Apache Server w/ XMLSocket Problem
Ok, I need some help here.
I have a perl socket on my apache server that correctly takes input from sockets and sends it back out to every socket connected to the perl socket. I have tested the perl socket, and it works correctly.
When I launch the Flash in the IDE, as a flash program, it functions correctly with the perl socket.
However, when I try to launch the Flash in a Browser on my apache server, it tells me it is unable to connect to the server.
However, I am seeing from feedback from my perl socket, the flash connects for about a half of a second, and thats it.
What could be the problem, do I have to include code in the flash to allow XMLSockets to connect in a browser as well?
Is there certain things I need to do with my apache server to make it work?
Also if I 'Preview as HTML' from Adobe Flash CS4, it does not connect.
August 17th, 2011, 06:02 PM
You might need to put a cross domain XML file on the server if it is a different domain than the Flash file. There's a ton of links on that via this search.
Quis custodiet ipsos custodes?
August 17th, 2011, 06:06 PM
My Flash File is on the same server as the perl socket, so I am assuming this is not the issue.
August 17th, 2011, 11:51 PM
Figured out the issue.
First when the XMLSocket tryies to connect, it sends <flash policy file /> and before you send anything back to it, or try to read from it you need to send a cross-domain-policy.
I was trying to read input instead of just sending it as soon as someone connected.
"<?xml version=\"1.0\"?><cross-domain-policy><allow-access-from domain=\"*\" to-ports=\"*\" /></cross-domain-policy>\0"