class Protocol::HTTP::Body::Readable

end
def close(error = nil) -> close the stream immediately.
def finish -> buffer the stream and close it.

def close(error = nil)

The consumer can call stop to signal that the stream output has terminated.
def close(error = nil)
end

def each

Enumerate all chunks until finished, then invoke `#close`.
def each
	while chunk = self.read
		yield chunk
	end
ensure
	self.close($!)
end

def empty?

Will read return any data?
def empty?
	false
end

def finish

Read all remaining chunks into a buffered body and close the underlying input.
def finish
	# Internally, this invokes `self.each` which then invokes `self.close`.
	Buffered.for(self)
end

def join

Read all remaining chunks into a single binary string using `#each`.
def join
	buffer = String.new.force_encoding(Encoding::BINARY)
	
	self.each do |chunk|
		buffer << chunk
		chunk.clear
	end
	
	if buffer.empty?
		return nil
	else
		return buffer
	end
end

def length

def length
	nil
end

def read

Read the next available chunk.
def read
	nil
end

def ready?

Returns:
  • (Boolean) -
def ready?
	false
end