class Protocol::HTTP2::DataFrame

DATA frames convey arbitrary, variable-length sequences of octets associated with a stream. One or more DATA frames are used, for instance, to carry HTTP request or response payloads.

DATA frames MAY also contain padding. Padding can be added to DATA frames to obscure the size of messages.

--------------- |Pad Length? (8)| ---------------———————————————–+ | Data (*) … --------------------------------------------------------------- | Padding (*) … ---------------------------------------------------------------

Constants

TYPE

Public Instance Methods

apply(connection) click to toggle source
# File lib/protocol/http2/data_frame.rb, line 57
def apply(connection)
        connection.receive_data(self)
end
end_stream?() click to toggle source
# File lib/protocol/http2/data_frame.rb, line 44
def end_stream?
        flag_set?(END_STREAM)
end
inspect() click to toggle source
# File lib/protocol/http2/data_frame.rb, line 61
def inspect
        "\#<#{self.class} stream_id=#{@stream_id} flags=#{@flags} #{@length}b>"
end
pack(data, *arguments, **options) click to toggle source
Calls superclass method Protocol::HTTP2::Padded#pack
# File lib/protocol/http2/data_frame.rb, line 48
def pack(data, *arguments, **options)
        if data
                super
        else
                @length = 0
                set_flags(END_STREAM)
        end
end