bodokaiser/node-websockets — pull request #23 by bodokaiser (2013-03-05 17:01:15+00:00)
Title: improve data handling of node socket (relates to #22)

Currently each data event on the socket is parsed as frame but as I experienced it can happen that a data event contains multiple frames glued together. To also handle this sort of frames which can occur on low latency impact I need to rewrite this part of the library.

WebSocketFrame is getting two new properties:
* Bool glued (is this a glued frame?, wsf.length smaller than buff.length)
* Buffer remnant (contains the remnant part of the glued chunk)

WebSocketSocket
parseFrame now has to read out wsf.glued and pass wsf.remnant to the whole loop if true.