Add a note about framed reads

This commit is contained in:
silvanshade 2022-06-17 18:01:13 -06:00
parent 20fb05c086
commit caf08cde97
No known key found for this signature in database

View file

@ -128,6 +128,7 @@ export class StreamDemuxer extends Queue<Uint8Array> {
this.#start = this.start();
}
// FIXME: we needs to actually do framed reads here since `bytes` may not be a complete message
private async start(): Promise<void> {
for await (const bytes of this) {
const delimited = Bytes.decode(bytes);