WICG / direct-sockets

Direct Sockets API for the web platform
Other
364 stars 14 forks source link

Create a ReadableByteStream for TCP sockets #49

Closed reillyeon closed 1 year ago

reillyeon commented 2 years 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.

reillyeon commented 2 years ago

Example PR adding this to the Web Serial API: https://github.com/WICG/serial/pull/137

GrapeGreen commented 1 year ago

https://github.com/WICG/direct-sockets/pull/65