TooTallNate/Java-WebSocket — pull request #58 by jribble (2012-01-12 00:03:58+00:00)
Title: Doing a buf.rewind in channelWrite causes a problem with partially writt...

...en buffers, which are placed on the buffer queue and then rewinded before sending the rest of the buffer.

Instead, buffers should be ready for writing to the socket before they are sent in to channelWrite.
I changed some rewinds to flips assuming that only what was written to the buffer should be written out to the socket. flip sets the buffer limit to the position to which the buffer had been written.