Class: SPDY::Protocol::Data::Frame

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/spdy/protocol.rb

Instance Method Summary collapse

Instance Method Details

#create(opts = {}) ⇒ Object



97
98
99
100
101
102
103
104
105
106
107
# File 'lib/spdy/protocol.rb', line 97

def create(opts = {})
  self.stream_id = opts[:stream_id]
  self.flags     = opts[:flags] if opts[:flags]

  if opts[:data]
    self.len       = opts[:data].size
    self.data      = opts[:data]
  end

  self
end