class Protocol::HTTP2::Connection

def receive_ping(frame)

def receive_ping(frame)
	if @state != :closed
		# This is handled in `read_payload`:
		# if frame.stream_id != 0
		# 	raise ProtocolError, "Ping received for non-zero stream!"
		# end
		
		unless frame.acknowledgement?
			reply = frame.acknowledge
			
			write_frame(reply)
		end
	else
		raise ProtocolError, "Cannot receive ping in state #{@state}"
	end
end