DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

andy has posted 1 posts at DZone. View Full User Profile

Flex Policy File Server

04.20.2009
| 2608 views |
  • submit to reddit
        require "socket"

PORT = 843

server	= TCPServer.open(PORT)
puts "the policy server is start..."

while (session = server.accept)
  puts "ye.."
  session.puts "<?xml version=\"1.0\"?><cross-domain-policy><allow-access-from domain=\"sub.app.test\" to-ports=\"61613\"/></cross-domain-policy>\000"
  session.close
end