class Protocol::Rack::Body::Streaming

Wraps a streaming response body into a compatible Protocol::HTTP body.

def call(stream)

def call(stream)
	raise "Streaming body has already been read!" if @output
	@block.call(stream)
end

def initialize(block, input = nil)

def initialize(block, input = nil)
	@block = block
	@input = input
	@output = nil
end

def read

Invokes the block in a fiber which yields chunks when they are available.
def read
	@output ||= Output.new(@input, @block)
	return @output.read
end

def stream?

def stream?
	true
end