Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Flash port 843 doesn't response #61

Closed
erickhsiao opened this Issue Oct 17, 2011 · 1 comment

Comments

Projects
None yet
2 participants

Perhaps this issue already solved?

I use web-socket-js for IE which connect via flash.
but get no response, I asked web-socket-js and they said it should be support by default.

just wondering any body also face this problem?

Collaborator

mloughran commented Oct 17, 2011

em-websocket doesn't listen on port 843 (nor should it)

Flash will try connecting on port 843. If it doesn't get a response it will try requesting the flash policy file on the WebSocket port (which em-websocket will respond to)

If you want to serve the flash policy file on port 843 you can use something super simple like this, possibly in the same process as em-websocket:

require 'eventmachine'

module FlashPolicy
  def post_init
    cross_domain_xml =<<-EOF
    <cross-domain-policy>
       <allow-access-from domain="*" to-ports="*" />
    </cross-domain-policy>  
    EOF

    send_data cross_domain_xml
    close_connection_after_writing
  end
end

EM.run {
  EventMachine::start_server '0.0.0.0', 843, FlashPolicy
}

@mloughran mloughran closed this Oct 17, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment