Class: Async::HTTP::Protocol::HTTP2::Stream::Input
- Inherits:
-
Body::Writable
- Object
- Readable
- Body::Writable
- Async::HTTP::Protocol::HTTP2::Stream::Input
- Defined in:
- lib/async/http/protocol/http2/stream.rb
Overview
A writable body which requests window updates when data is read from it.
Instance Method Summary collapse
-
#initialize(stream, length) ⇒ Input
constructor
A new instance of Input.
- #read ⇒ Object
Methods inherited from Body::Writable
#close, #closed?, #empty?, #inspect, #length, #write
Constructor Details
#initialize(stream, length) ⇒ Input
Returns a new instance of Input.
33 34 35 36 37 |
# File 'lib/async/http/protocol/http2/stream.rb', line 33 def initialize(stream, length) super(length) @stream = stream end |
Instance Method Details
#read ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/async/http/protocol/http2/stream.rb', line 39 def read if chunk = super # If we read a chunk fron the stream, we want to extend the window if required so more data will be provided. @stream.request_window_update end return chunk end |