class Protocol::HTTP2::Connection

def create_stream(id = next_stream_id, &block)

Returns:
  • (Stream) - the created stream.
def create_stream(id = next_stream_id, &block)
	if @streams.key?(id)
		raise ProtocolError, "Cannot create stream with id #{id}, already exists!"
	end
	
	if block_given?
		return yield(self, id)
	else
		return Stream.create(self, id)
	end
end