class Protocol::HTTP2::Connection

def receive_headers(frame)

On the server side, starts a new request.
def receive_headers(frame)
	stream_id = frame.stream_id
	
	if stream_id.zero?
		raise ProtocolError, "Cannot receive headers for stream 0!"
	end
	
	if stream = @streams[stream_id]
		stream.receive_headers(frame)
	else
		if stream_id <= @remote_stream_id
			raise ProtocolError, "Invalid stream id: #{stream_id} <= #{@remote_stream_id}!"
		end
		
		# We need to validate that we have less streams than the specified maximum:
		if @streams.size < @local_settings.maximum_concurrent_streams
			stream = accept_stream(stream_id)
			@remote_stream_id = stream_id
			
			stream.receive_headers(frame)
		else
			raise ProtocolError, "Exceeded maximum concurrent streams"
		end
	end
end