Also, may as well publicly repeat my invitation to have a chat about standardizing a protocol around this kind of thing. You're rewriting everything anyway... bre at pagekite dot net. :-)
If I were starting from scratch today, I'd base off websockets instead of the HTTP chunked encoding as I did, but other than that I have been very happy with it.