class Protocol::HTTP2::PingFrame
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.
---------------------------------------------------------------
| | | Opaque Data (64) | | | ---------------------------------------------------------------
Constants
- TYPE
Public Instance Methods
acknowledge()
click to toggle source
Calls superclass method
Protocol::HTTP2::Acknowledgement#acknowledge
# File lib/protocol/http2/ping_frame.rb, line 63 def acknowledge frame = super frame.pack self.unpack return frame end
apply(connection)
click to toggle source
# File lib/protocol/http2/ping_frame.rb, line 59 def apply(connection) connection.receive_ping(self) end
connection?()
click to toggle source
# File lib/protocol/http2/ping_frame.rb, line 55 def connection? true end
read_payload(stream)
click to toggle source
Calls superclass method
Protocol::HTTP2::Frame#read_payload
# File lib/protocol/http2/ping_frame.rb, line 71 def read_payload(stream) super if @length != 8 raise FrameSizeError, "Invalid frame length: #{@length} != 8!" end end