socketio / engine.io-parser

refactor: prepend a header to each WebTransport chunk
This commit updates the format of the header added in [1], in order to match the format used for a WebSocket frame ([2]). Two advantages: - small payloads only need 1 byte instead of 4 - payloads larger than 2^31 bytes are supported [1]: https://github.com/socketio/engine.io-parser/commit/6142324fa61204393028f3f58f336d053030ea5f [2]: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#decoding_payload_length
Damien Arrachequesne Damien Arrachequesne committed on Aug 1, 2023, 10:16 PM
Showing 4 changed files +126 additions -62 deletions
M lib/index.ts +71 -18
M test/browser.ts +2 -2
M test/index.ts +51 -40
M test/node.ts +2 -2
Browse files at this commit โ†’