I took the java “AquaServer” that was originally written by somebody in the flash community (can’t remember who, i know it was a flash superstar, a couple names come to mind but i’m not sure). Well anyway, it’s almost completely rewritten.
So, what benefit is it to you? The Flash Player’s security model can often be very complicated because of its unique place and function in a user’s computing experience. Providing this socket server will serve as a fully functional example of how to interact with the Flash Player’s Socket class ( flash.net.Socket ) with respect to using low-level bytes, its security model ( socket policy files, etc ). In fact this is the server side software that the flash player team (my team) uses at Adobe to test the functionality in the first place.
Since we have no reason to crunch any data on the server-side, we simply accept data from the client, and echo it back. In the real world, i could imagine that there would be some server-side crunching going on, so in my code look for where i’m doing the echo’ing (in an “else” clause in the AquaClientThread’s run() method) and start from there.
Oh, and also, for the record: This does not count as official Adobe software, its just something i made that we use internally that I thought others can benefit from, don’t be surprised if you find significant bugs. Also, for all we know, the Socket security model (or something) could change which would cause this server to break — so if you use it, be prepared to have to make changes to it if necessary.
I’ve copy/pasted our internal documentation below: