- From: Takeshi Yoshino <notifications@github.com>
- Date: Mon, 16 Feb 2015 15:58:48 -0800
- To: whatwg/streams <streams@noreply.github.com>
- Message-ID: <whatwg/streams/issues/253/74593666@github.com>
Thanks for review, Domenic. I'll reply to your analysis later. Here's an attempt to keep sync `read()`. Follow up discussion coming today, maybe.
```es6
class ReadableStream {
...
// Controls how much data to pull. For queue-backed ones, this corresponds to
// the high water mark. Set a positive integer to pull or 0 not to pull. It
// depends on each implementation whether the size of the positive integer is
// interpreted or not. Initially set to 0.
get window()
set window(value)
...
}
```
```es6
class ReadableByteStream extends ReadableStream {
// Returns the number of bytes available for synchronous read by readInto()
// method.
get buffered()
// Feeds an ArrayBuffer with region specification. The next pull is done with
// the specified buffer. If window has ever been set to non 0, throws.
feedBuffer(uint8Array)
// Reads bytes available for synchronous reading, stores them into the given
// Uint8Array and returns the number of bytes stored (can be less than the
// size of the specified region).
readInto(uint8Array)
}
```
---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/253#issuecomment-74593666
Received on Monday, 16 February 2015 23:59:15 UTC