[streams] explicity operate on underlying source and sink instead of public methods (#321)

Certain optimizations like piping off-main-thread are much more difficult in a world where the public methods of a ReadableStream and WritableStream can be monkey patched with js.  To enable UAs to implement these optimizations the spec should be written such that it operates directly on the underlying sources and sinks.

For example, ReadableStream.pipeTo(ws) should not call ws.write(), but should write data to ws's underlying sink.

This makes the API a bit more "DOMy" a bit less "JSy", but makes it much easier to create efficient implementations in multi-threaded browsers.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/321

Received on Wednesday, 8 April 2015 00:25:05 UTC