#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    18
    Rep Power
    0

    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.

    Thanks Guys.
  2. #2
  3. No Profile Picture
    Gotta get to the next screen..
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2003
    Location
    Legion of Dynamic Discord
    Posts
    6,678
    Rep Power
    3164
    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?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    18
    Rep Power
    0
    My Flash File is on the same server as the perl socket, so I am assuming this is not the issue.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2011
    Posts
    18
    Rep Power
    0
    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.

    Code:
    "<?xml version=\"1.0\"?><cross-domain-policy><allow-access-from domain=\"*\" to-ports=\"*\" /></cross-domain-policy>\0"
    I was trying to read input instead of just sending it as soon as someone connected.

    Thanks guys

IMN logo majestic logo threadwatch logo seochat tools logo