plicease/AnyEvent-WebSocket-Client — pull request #14 by debug-ito (2013-11-04 00:20:31+00:00)
Title: AnyEvent::WebSocket::Connection enhancements

Implemented some features on AnyEvent::WebSocket::Connection mostly for better conformance to RFC 6455.

- Automatically respond to a close frame with a close frame (RFC6455 5.5.1)
- Make sure "finish" callbacks are called only once. I think this is more intuitive behavior.
- Automatically shutdown the socket on "finish" event. This makes sure EOF signal is sent to the peer.
- Refuse to send/receive frames after it sends/receives a close frame. (RFC6455 1.4, 5.5.1)
- Abort the connection when it receives a too huge message. The size limit is imposed by Protocol::WebSocket::Frame (RFC6455 10.4)
- Automatically respond to a ping frame with a pong frame of the same payload (RFC6455 5.5.2, 5.5.3)
- Add "masked" attribute. If set, outgoing frames are masked.
- Client's Connection now sets masked => true (RFC6455 5.3, 6.1).
- Documentation update.

See the commit log for detail.