class Duo::Data
- Duo::Data
- IO
- Reference
- Object
Overview
Wraps a circular buffer to buffer incoming Data. The buffer capacity is the initial window size. The stream window size decreases whenever reading and a WindowUpdate frame will be sent whenever the window size falls below half the buffer size (incremented by half the buffer size).
Defined in:
duo/data.crInstance Method Summary
-
#close : Nil
Closes this
IO
. - #close_read : Nil
-
#read(slice : Bytes) : Int32
Reads previously buffered Data.
-
#size : Int32
Returns the collected size in bytes of streamed Data frames.
Instance Method Detail
def close : Nil
#
Description copied from class IO
Closes this IO
.
IO
defines this is a no-op method, but including types may override.
def read(slice : Bytes) : Int32
#
Reads previously buffered Data.
If window size falls below half buffer capacity, sends a WindowUpdate frame to increment the window size by half the buffer size, which fits into the buffer's remaining space.