Closed reillyeon closed 1 year ago
TCP is a byte stream transport so it should create a ReadableByteStream rather than a regular byte stream. This will also allow developers to create a "byob" stream reader and avoid allocating memory for receive buffers.
ReadableByteStream
Example PR adding this to the Web Serial API: https://github.com/WICG/serial/pull/137
https://github.com/WICG/direct-sockets/pull/65
TCP is a byte stream transport so it should create a
ReadableByteStream
rather than a regular byte stream. This will also allow developers to create a "byob" stream reader and avoid allocating memory for receive buffers.