From 2cb26ba8084cd37996330616b885de1c780d848e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 Jan 2011 17:39:11 -0800 Subject: event_machine: factor out async.callback handling This will allow Coolio to use it, too. --- lib/rainbows/ev_core.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/rainbows/ev_core.rb') diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb index a8bedce..013df39 100644 --- a/lib/rainbows/ev_core.rb +++ b/lib/rainbows/ev_core.rb @@ -11,6 +11,11 @@ module Rainbows::EvCore # Apps may return this Rack response: AsyncResponse = [ -1, {}, [] ] ASYNC_CALLBACK = "async.callback".freeze + def write_async_response(response) + status, headers, body = response + write_response(status, headers, body, false) + end + ASYNC_CLOSE = "async.close".freeze def post_init -- cgit v1.2.3-24-ge0c7