vti/protocol-websocket — pull request #20 by debug-ito (2013-10-11 02:51:14+00:00)
Title: added interface and documentation to Frame class

I added some interface to Frame class mostly because I want to craft WebSocket frames to send in a more fine-grained way.

Some of the added interfaces were already implemented, but they are now clearly documented and tested.

Overview of the changes:

* Document "fin" field for new(). to_bytes() now encodes "fin" bit according to it.
* Add "continuation" frame type (opcode 0). Together with "fin" field, users can now send fragmented frames.
* Document and test "opcode" field for new(). If "type" and "opcode" conflicts, "type" will win, which is documented and tested.
* Document and test opcode() accessor method.
* Now "type" field for new() is immediately translated to opcode. This fixes vti/protocol-websocket#19
* Document "masked" field for new().
* Document "version" field for new().
* Document and test that append($chunk) will modify $chunk, which surprised me.