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-7.3.2 lib/rack/app/instance_methods/streaming.rb
rack-app-7.3.1 lib/rack/app/instance_methods/streaming.rb
rack-app-7.3.0 lib/rack/app/instance_methods/streaming.rb
rack-app-7.2.2 lib/rack/app/instance_methods/streaming.rb
rack-app-7.2.1 lib/rack/app/instance_methods/streaming.rb
rack-app-7.2.0 lib/rack/app/instance_methods/streaming.rb
rack-app-7.1.0 lib/rack/app/instance_methods/streaming.rb
rack-app-7.0.0 lib/rack/app/instance_methods/streaming.rb
rack-app-6.8.0 lib/rack/app/instance_methods/streaming.rb
rack-app-6.7.1 lib/rack/app/instance_methods/streaming.rb
rack-app-6.7.0 lib/rack/app/instance_methods/streaming.rb
rack-app-6.6.0 lib/rack/app/instance_methods/streaming.rb
rack-app-6.5.0 lib/rack/app/instance_methods/streaming.rb
rack-app-6.4.1 lib/rack/app/instance_methods/streaming.rb
rack-app-6.4.0 lib/rack/app/instance_methods/streaming.rb
rack-app-6.3.3 lib/rack/app/instance_methods/streaming.rb
rack-app-6.3.2 lib/rack/app/instance_methods/streaming.rb
rack-app-6.3.1 lib/rack/app/instance_methods/streaming.rb
rack-app-6.3.0 lib/rack/app/instance_methods/streaming.rb
rack-app-6.2.0 lib/rack/app/instance_methods/streaming.rb