gaojingsong 阅读(158) 评论(0)

This is a implementation of a websocket server and client for the web toolkit. It is currently a work in progress, but it has a pretty comprehensive test suite that exercises a whole bunch of functionality. The server/client can:










Work under SSL (all the tests are done both in the clear and under SSL)

Handle fragmented messages (the server will buffer up a complete message before passing it to your frameHandler

Cut off messages which are too big (whether single-messages or fragmented)

Kill the connection when there's a protocol violation according to the websocket spec (probably doesn't account for everything at the moment)

Automatically respond to pings with pongs

Match up outgoing Pings and incoming Pongs to find round trip times

Automatically ping every client according to the autoPingInterval, using the pingGenerator to generate the body of each ping

Pass almost the entire Autobahn Test Suite

client-report.html and sever-report.html contain the Autobahn test reports for both the server and the client. The only tests currently failing are unicode strictness tests, which means the server isn't killing connections in the case of malformed unicode as strictly as it should.