This is a memo to myself more than anything else… but there has got to be a way to use UDP from a SWF running through your web browser.
Pieces of the puzzle:
- Flash 9 has binary TCP socket support, but no UDP.
- Standalone projectors like MDM Zinc can add UDP capabilities to the mix.
- A projector and a SWF in the browser can communicate together very happily via the LocalConnection interface.
But web browsers are understandably reluctant to download and run a 3rd party UDP proxy application for you 😉 It’s also not terribly platform independent to require something running in userspace outside of the VM.
Java has UDP support. You could write a UDP proxy in Java that uses a standard local TCP socket to talk to the SWF – both the SWF and the applet would have to load from the same page. Don’t know whether Java’s and Flash’s security policies would allow this sort of behavior… probably not. I know applets have difficulties connecting to anything but the originating server – so they probably can’t listen for traffic on the local host either. And if they can, there’s probably some big security certificate you have to sign in blood and offer to the Sun gods or something…
Of course, the dumb option would be to have a remote TCP->UDP proxy… but that eliminates any sort of performance gain that might have been achieved by using UDP in the first place, so that’s only valid in the weird case where you honestly need to talk to a UDP server for whatever reason and don’t care about the lag.
No, the proxy must run locally, somehow.