class Protocol::HTTP2::PushPromiseFrame
---------------------------------------------------------------
| Padding (*) …---------------------------------------------------------------
| Header Block Fragment (*) …-
—————————–-------------------------------
|R| Promised Stream ID (31) |-
————------------------------------------------------
|Pad Length? (8)|---------------
The PUSH_PROMISE frame is used to notify the peer endpoint in advance of streams the sender intends to initiate. The PUSH_PROMISE frame includes the unsigned 31-bit identifier of the stream the endpoint plans to create along with a set of headers that provide additional context for the stream.
def apply(connection)
def apply(connection) connection.receive_push_promise(self) end
def pack(stream_id, data, *arguments, **options)
def pack(stream_id, data, *arguments, **options) super([stream_id].pack(FORMAT) + data, *arguments, **options) end
def unpack
def unpack data = super stream_id = data.unpack1(FORMAT) return stream_id, data.byteslice(4, data.bytesize - 4) end