SIGN IN SIGN UP
socketio / socket.io UNCLAIMED

Realtime application framework (Node.JS server)

0 0 0 TypeScript

fix: respect the offset and length of TypedArray objects

The parser now returns the TypedArray object instead of the underlying
array buffer, so its offset and length are now taken in account (which
is the behavior of the classic WebSocket implementation).

Notes:

- this was already the case for the Node.js implementation

- in v3, the TypedArray object was always converted to an array buffer
because a byte was added at the beginning ("message" type)

- we could also have used "data.slice().buffer", but it would have
resulted in the copy of the buffer

Related:

- https://github.com/socketio/engine.io-parser/issues/122
- https://github.com/socketio/engine.io-client/issues/677
D
Damien Arrachequesne committed
6d7dd76130690afda6c214d5c04305d2bbc4eb4d
Parent: 6dfab69