class WebSocket::Driver::Hybi::Message - websocket-driver-0.6.5 Documentation

# class WebSocket::Driver::Hybi::Message

### Attributes

data[RW]
opcode[RW]
rsv1[RW]
rsv2[RW]
rsv3[RW]

### Public Class Methods

new() click to toggle source

    # File lib/websocket/driver/hybi/message.rb, line 12
    def initialize
      @rsv1   = false
      @rsv2   = false
      @rsv3   = false
      @opcode = nil
      @data   = String.new('').force_encoding(BINARY)
    end

### Public Instance Methods

<<(frame) click to toggle source

    # File lib/websocket/driver/hybi/message.rb, line 20
    def <<(frame)
      @rsv1   ||= frame.rsv1
      @rsv2   ||= frame.rsv2
      @rsv3   ||= frame.rsv3
      @opcode ||= frame.opcode
      @data   <<  frame.payload
    end