Sha256: 272a0d17ee8cbb28271c2be34335530c14276e49c2e94fcb164edd0c5b734ab1

Contents?: true

Size: 638 Bytes

Versions: 53

Compression:

Stored size: 638 Bytes

Contents

module Rack::App::InstanceMethods::Streaming
  #
  # Copyright (c) 2007, 2008, 2009 Blake Mizerany
  # Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Konstantin Haase
  #
  # Allows to start sending data to the client even though later parts of
  # the response body have not yet been generated.
  #
  # The close parameter specifies whether Stream#close should be called
  # after the block has been executed. This is only relevant for evented
  # servers like Thin or Rainbows.
  def stream(keep_open = false, &back)
    response.body = Rack::App::Streamer.new(request.env, :keep_open => keep_open, &back)
    finish!
  end
end

Version data entries

53 entries across 53 versions & 2 rubygems

Version Path
rack-app-11.0.2 lib/rack/app/instance_methods/streaming.rb
rack-app-11.0.1 lib/rack/app/instance_methods/streaming.rb
rack-app-11.0.0 lib/rack/app/instance_methods/streaming.rb
rack-app-10.0.0 lib/rack/app/instance_methods/streaming.rb
rack-app-9.0.0 lib/rack/app/instance_methods/streaming.rb
rack-app-8.1.0 lib/rack/app/instance_methods/streaming.rb
rack-app-8.0.1 lib/rack/app/instance_methods/streaming.rb
rack-app-8.0.0 lib/rack/app/instance_methods/streaming.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/rack-app-7.7.0/lib/rack/app/instance_methods/streaming.rb
rack-app-7.7.0 lib/rack/app/instance_methods/streaming.rb
rack-app-7.6.5 lib/rack/app/instance_methods/streaming.rb
rack-app-7.6.4 lib/rack/app/instance_methods/streaming.rb
rack-app-7.6.3 lib/rack/app/instance_methods/streaming.rb
rack-app-7.6.2 lib/rack/app/instance_methods/streaming.rb
rack-app-7.6.1 lib/rack/app/instance_methods/streaming.rb
rack-app-7.6.0 lib/rack/app/instance_methods/streaming.rb
rack-app-7.5.2 lib/rack/app/instance_methods/streaming.rb
rack-app-7.5.1 lib/rack/app/instance_methods/streaming.rb
rack-app-7.5.0 lib/rack/app/instance_methods/streaming.rb
rack-app-7.4.0 lib/rack/app/instance_methods/streaming.rb