Class: Protocol::HTTP2::ContinuationFrame

Inherits:
Frame
  • Object
show all
Includes:
Continued
Defined in:
lib/protocol/http2/continuation_frame.rb

Overview

The CONTINUATION frame is used to continue a sequence of header block fragments. Any number of CONTINUATION frames can be sent, as long as the preceding frame is on the same stream and is a HEADERS, PUSH_PROMISE, or CONTINUATION frame without the END_HEADERS flag set.

--------------------------------------------------------------- | Header Block Fragment (*) … ---------------------------------------------------------------

Constant Summary collapse

TYPE =
0x9

Constants included from Continued

Protocol::HTTP2::Continued::LIMIT

Constants inherited from Frame

Frame::HEADER_FORMAT, Frame::LENGTH_HISHIFT, Frame::LENGTH_LOMASK, Frame::STREAM_ID_MASK, Frame::VALID_LENGTH, Frame::VALID_STREAM_ID

Instance Attribute Summary

Attributes included from Continued

#continuation

Attributes inherited from Frame

#flags, #length, #payload, #stream_id, #type

Instance Method Summary collapse

Methods included from Continued

#continued?, #end_headers?, #initialize, #pack, #unpack, #write

Methods inherited from Frame

#<=>, #clear_flags, #connection?, #flag_set?, #header, #initialize, #pack, parse_header, #read_header, #read_payload, #set_flags, #to_ary, #unpack, #valid_type?, #write, #write_header, #write_payload

Instance Method Details

#apply(connection) ⇒ Object

This is only invoked if the continuation is received out of the normal flow.



135
136
137
# File 'lib/protocol/http2/continuation_frame.rb', line 135

def apply(connection)
  connection.receive_continuation(self)
end

#inspectObject

Get a string representation of the continuation frame.



141
142
143
# File 'lib/protocol/http2/continuation_frame.rb', line 141

def inspect
  "\#<#{self.class} stream_id=#{@stream_id} flags=#{@flags} length=#{@length || 0}b>"
end

#read(stream, maximum_frame_size, limit = 8) ⇒ Object

Read the frame and any continuation frames from the stream.



130
131
132
# File 'lib/protocol/http2/continuation_frame.rb', line 130

def read(stream, maximum_frame_size, limit = 8)
  super
end