This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem install fast_xor | |
module EventMachine | |
module WebSocket | |
class MaskedString < String | |
def read_mask | |
raise "Too short" if bytesize < 4 # TODO - change | |
@masking_key = String.new(self[0..3]) | |
end | |
def full_mask(start, length) |