As part of our current project (which heavily uses undertow as http server) we need to implement a simple flash policy server.
This server is basically just a simple SocketServer which returns a small XML fragment
(java example code in the first answer here http://stackoverflow.com/questions/2569863/trouble-creating-a-java-policy-server-for-a-simple-flash-app)

My question is, how can i implement this reusing the undertow infrastructure. Directly access XNIO? What would you suggest?

Thanks, Sascha