Connecting to Socket.IO 1.0 from flash

Socket.IO is a great socket communication library that I’ve used many times in recent years. To connect to the server from a flash client I’ve had to rely on a library I found on github called FlashSocket.IO, actually on improved fork of an earlie, now stagnant project.

Socket.IO has recently made it to a 1.0 release, which is long overdue seeing as many people have been using it in production for ages. However this is not a ‘finally stable’ 1.0 release. This is more like a 2.0 release with a complete rewrite of the underlying engine and many API and protocol changes. If you were only using it via the official js client and not trying to inspect the internals at all then you can probably just update without a hitch.

However for my flash client this meant trouble. So, I’ve gone through and updated the flash client to work with 1.0, and added a few other features too, such as ssl compatibility (essential for working reliably with public networks), querystring parameter support (for passing arbitrary parameters from the client to the server to be available at connection time) and making the FlashSocket EventDispatcher robotlegs friendly.

It’s up here, so if you need 1.0 compatibility from flash have a go, and let me know if you have any problems.