diff options
author | Leo K <crowlkats@toaxl.com> | 2021-10-05 22:38:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 22:38:27 +0200 |
commit | 77a00ce1fb4ae2523e22b9b84ae09a0200502e38 (patch) | |
tree | 0027a2ff3dbff1e2b0c3afa7ce0f0e54805c7d62 /ext/websocket/01_websocket.js | |
parent | d67e85850688117e116bbf7054e80f30fe07afe6 (diff) |
chore: various op cleanup (#12329)
Diffstat (limited to 'ext/websocket/01_websocket.js')
-rw-r--r-- | ext/websocket/01_websocket.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js index 79e4d923c..54e05c408 100644 --- a/ext/websocket/01_websocket.js +++ b/ext/websocket/01_websocket.js @@ -324,10 +324,10 @@ const sendTypedArray = (ta) => { this[_bufferedAmount] += ta.byteLength; PromisePrototypeThen( - core.opAsync("op_ws_send", { - rid: this[_rid], + core.opAsync("op_ws_send", this[_rid], { kind: "binary", - }, ta), + value: ta, + }), () => { this[_bufferedAmount] -= ta.byteLength; }, @@ -348,10 +348,9 @@ const d = core.encode(string); this[_bufferedAmount] += d.byteLength; PromisePrototypeThen( - core.opAsync("op_ws_send", { - rid: this[_rid], + core.opAsync("op_ws_send", this[_rid], { kind: "text", - text: string, + value: string, }), () => { this[_bufferedAmount] -= d.byteLength; @@ -456,8 +455,7 @@ break; } case "ping": { - core.opAsync("op_ws_send", { - rid: this[_rid], + core.opAsync("op_ws_send", this[_rid], { kind: "pong", }); break; |