diff options
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; |