From 77a00ce1fb4ae2523e22b9b84ae09a0200502e38 Mon Sep 17 00:00:00 2001 From: Leo K Date: Tue, 5 Oct 2021 22:38:27 +0200 Subject: chore: various op cleanup (#12329) --- ext/websocket/01_websocket.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'ext/websocket/01_websocket.js') 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; -- cgit v1.2.3