Sinatra thin 是否支持 sinatra-contrib 中的 streaming?

ensonmj · January 14, 2013 · 2434 hits

同样的代码,跑在 thin 上面死活报“ << not opend for writing" 偶尔试了下 puma,能够正确执行

大概代码:

require 'sinatra/base' require 'sinatra/streaming'

class Test < Sinatra::Base helpers Sinatra::Streaming

get '/' do stream :keep_open do |out| out << 'request stream" 11.tiems { |i| out << Time.now| end end end

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.