class Protocol::HTTP::Body::Writable

def read

@raises [Exception] If the body was closed due to an error.
@returns [String | Nil] The next chunk, or `nil` if the body is finished.

Read the next available chunk.
def read
	if @error
		raise @error
	end
	
	# This operation may result in @error being set.
	chunk = @queue.pop
	
	if @error
		raise @error
	end
	
	return chunk
end