socketio / engine.io-parser

feat: prepend a header to each WebTransport chunk
WebTransport is a stream-based protocol, so chunking boundaries are not always preserved. That's why we will now prepend a 4-bytes header to each chunk: - first bit indicates whether the payload is plain text (0) or binary (1) - next 31 bits indicate the length of the payload See also: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#format
Damien Arrachequesne Damien Arrachequesne committed on Jul 31, 2023, 05:59 AM
Showing 4 changed files +365 additions -205 deletions
M lib/index.ts +95 -13
M test/browser.ts +27 -98
M test/index.ts +218
M test/node.ts +25 -94
Browse files at this commit โ†’