Skip to content

Commit

Permalink
Include raw_length in Websocket event
Browse files Browse the repository at this point in the history
  • Loading branch information
ypisetsky authored and joemun committed Dec 2, 2024
1 parent a2ef3d8 commit b4eb0ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-native/Libraries/WebSocket/WebSocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ class WebSocket extends (EventTarget(...WEBSOCKET_EVENTS): typeof EventTarget) {
data = BlobManager.createFromOptions(ev.data);
break;
}
this.dispatchEvent(new WebSocketEvent('message', {data}));
const raw_length = ev.raw_length;
this.dispatchEvent(new WebSocketEvent('message', {data, raw_length}));
}),
this._eventEmitter.addListener('websocketOpen', ev => {
if (ev.id !== this._socketId) {
Expand Down

0 comments on commit b4eb0ee

Please sign in to comment.