module Roda::RodaPlugins::Streaming::InstanceMethods

def stream(opts=OPTS, &block)

See Streaming for details.
status and headers, calling the block to get the streaming response.
Immediately return a streaming response using the current response
def stream(opts=OPTS, &block)
  opts = opts.merge(:scheduler=>EventMachine) if !opts.has_key?(:scheduler) && env['async.callback']
  if opts[:loop]
    block = proc do |out|
      until out.closed?
        yield(out)
      end
    end
  end
  throw :halt, @_response.finish_with_body(Stream.new(opts, &block))
end