Class: HT2P::Client::Response::Chunked
- Defined in:
- lib/ht2p/client/response.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ Chunked
constructor
A new instance of Chunked.
- #read(length = nil) ⇒ Object
Constructor Details
#initialize(client) ⇒ Chunked
Returns a new instance of Chunked.
58 59 60 61 |
# File 'lib/ht2p/client/response.rb', line 58 def initialize(client) super client, nil parse_size end |
Instance Method Details
#read(length = nil) ⇒ Object
63 64 65 66 |
# File 'lib/ht2p/client/response.rb', line 63 def read(length=nil) parse_size if @size <= 0 super length end |