class Protocol::HTTP2::PingFrame
---------------------------------------------------------------
| |
| Opaque Data (64) |
| |---------------------------------------------------------------
The PING frame is a mechanism for measuring a minimal round-trip time from the sender, as well as determining whether an idle connection is still functional. PING frames can be sent from any endpoint.
def acknowledge
Create an acknowledgement PING frame with the same payload.
def acknowledge frame = super frame.pack self.unpack return frame end
def apply(connection)
Apply this PING frame to a connection for processing.
def apply(connection) connection.receive_ping(self) end
def connection?
Check if this frame applies to the connection level.
def connection? true end
def read_payload(stream)
@parameter stream [IO] The stream to read from.
Read and validate the PING frame payload.
def read_payload(stream) super if @stream_id != 0 raise ProtocolError, "Settings apply to connection only, but stream_id was given" end if @length != 8 raise FrameSizeError, "Invalid frame length: #{@length} != 8!" end end