diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-01-07 17:10:46 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-07 18:08:25 -0800 |
commit | 4747aa0d07950b9abbb036bc02491c4639dc9f80 (patch) | |
tree | 997785e3ed31edd70d6a8d6d8c1910708c4f0094 /lib/rainbows/coolio/sendfile.rb | |
parent | 37ec9ef3272931f42b4b0bb3f04a3855a8702a05 (diff) | |
download | rainbows-4747aa0d07950b9abbb036bc02491c4639dc9f80.tar.gz |
* lazy load uncommon classes: StreamFile, Response{Chunk,}Pipe * remove needless rainbows/coolio/sendfile module since we're lazily loaded now along with the rest of rainbows/coolio/client and only in the worker.
Diffstat (limited to 'lib/rainbows/coolio/sendfile.rb')
-rw-r--r-- | lib/rainbows/coolio/sendfile.rb | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/rainbows/coolio/sendfile.rb b/lib/rainbows/coolio/sendfile.rb deleted file mode 100644 index ead51a8..0000000 --- a/lib/rainbows/coolio/sendfile.rb +++ /dev/null @@ -1,17 +0,0 @@ -# -*- encoding: binary -*- -# :enddoc: -module Rainbows::Coolio::Sendfile - if IO.method_defined?(:sendfile_nonblock) - def rev_sendfile(sf) # +sf+ is a Rainbows::StreamFile object - sf.offset += (n = @_io.sendfile_nonblock(sf, sf.offset, sf.count)) - 0 == (sf.count -= n) and raise EOFError - enable_write_watcher - rescue Errno::EAGAIN - enable_write_watcher - end - else - def rev_sendfile(body) - write(body.to_io.sysread(0x4000)) - end - end -end |