Subject: [hybi] AS3 WebSocket -06 Library and Test App

From: Brian <[email-masked]>
Date: Mon, 28 Mar 2011 02:21:41 -0700

My in-progress ActionScript 3 WebSocket-06 client library is now up on
GitHub, in case any of you might find it a helpful sparring-partner
for your server implementations.  You can find it here:
https://github.com/worlize/AS3WebSocket

There are still a few things missing that I intend to address soon,
and it hasn't undergone extensive testing yet.  I also built a test
application with Adobe Air that knows about a couple of the
libwebsocket-test-server subprotocols.  You can grab a pre-built .air
binary of that app under the "Downloads" section of the GitHub repo.

Screenshot showing AS3WebSocket interoperating with Andy Green's test
page: http://blog.worlize.com/media/as3websocket.png

Current Features:
- Support for the -06 including the handshake, framing, and masking
- Support for the deflate-stream extension

Known Issues:
- Fragmentation is not yet supported
- There is no user-provided extension API implemented
- No wss:// support yet
- Only the libwebsocket-test-server subprotocols mentioned have been
tested so far
- Only tested in Adobe Air, not yet in Flash Player.. probably have to
add a little code to make it check for a policy file for Flash Player.

Cheers,
Brian

On Wed, Mar 9, 2011 at 1:38 PM, Brian <[email-masked]> wrote:
> I just wanted to send a general "Thank you!" to everyone on the list
> for all your long-suffering hard work that has made WebSockets a great
> and yet still simple protocol.  Last night I coded up a partial client
> implementation in Flash of the -06 draft... just enough to connect to
> Andy Green's excellent libwebsockets-test-server using the
> dumb-increment-protocol and receive the continually incrementing
> numbers that it spits out.  I wrote an implementation of the handshake
> and a parser for the framing based on nothing but the current -06
> draft, and to my surprise and delight, the whole thing worked
> perfectly on the first try.  That is truly a testament to the quality
> of the draft and the clarity of its writing, as well as the simplicity
> of the protocol.  It's extremely close to that perfect balance point
> of features vs. simplicity.
>
> So give yourselves all a collective pat on the back!  We've really got
> an amazing working draft and an excellent protocol that is poised to
> truly transform the real-time web once it's complete!  Actually
> sitting down to write my own implementation has really re-kindled my
> excitement and enthusiasm for the whole project!
>
> I plan to finish out the client implementation, with masking and
> support for extensions very soon.  When it's in a more sane state I
> will publish it on GitHub, along with a pre-compiled Adobe Air test
> app that will work with all of Andy's libwebsockets-test-server
> subprotocols.
>
> Cheers,
> Brian
>