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



223
224
225
226
227
228
229
230
231
232
233
# File 'lib/spdy/protocol.rb', line 223

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