Fixed payload length bug; Added protocol header, ping/pong, data masking.

16-bit payload lengths were invalid due to a typo, && should be &.

Added Sec-WebSocket-Protocol header.

getData and sendData methods now take an opcode value. This is used to implement ping/pong.

sendEncodedData now applies a mask to the data.

WebSocket constants have been #defined.
Merge pull request #1 from bergcloud/master

Patch to fix some minor bugs and broaden functionality