class Protocol::HTTP2::Stream

def receive_reset_stream(frame)

def receive_reset_stream(frame)
	if @state == :idle
		# If a RST_STREAM frame identifying an idle stream is received, the recipient MUST treat this as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
		raise ProtocolError, "Cannot receive reset stream in state: #{@state}!"
	else
		error_code = frame.unpack
		
		close!(error_code)
		
		return error_code
	end
end