Sha256: da0355997fae2359e70167753371af83c0974a241cc488f7d6e9b5ed03b1ffdf

Contents?: true

Size: 302 Bytes

Versions: 26

Compression:

Stored size: 302 Bytes

Contents

# -*- encoding: binary -*-
# :enddoc:
#
class Rainbows::Epoll::ResponseChunkPipe < Rainbows::Epoll::ResponsePipe
  def tryread
    @io or return

    case rv = super
    when String
      "#{rv.size.to_s(16)}\r\n#{rv}\r\n"
    when nil
      close
      "0\r\n\r\n"
    else
      rv
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
rainbows-4.1.0 lib/rainbows/epoll/response_chunk_pipe.rb
rainbows-4.0.0 lib/rainbows/epoll/response_chunk_pipe.rb
rainbows-3.4.0 lib/rainbows/epoll/response_chunk_pipe.rb
rainbows-3.3.0 lib/rainbows/epoll/response_chunk_pipe.rb
rainbows-3.2.0 lib/rainbows/epoll/response_chunk_pipe.rb
rainbows-3.1.0 lib/rainbows/epoll/response_chunk_pipe.rb