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/02_websocketstream.js | |
| parent | d67e85850688117e116bbf7054e80f30fe07afe6 (diff) | |
chore: various op cleanup (#12329)
Diffstat (limited to 'ext/websocket/02_websocketstream.js')
| -rw-r--r-- | ext/websocket/02_websocketstream.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ext/websocket/02_websocketstream.js b/ext/websocket/02_websocketstream.js index f7c4d4d0f..82f306333 100644 --- a/ext/websocket/02_websocketstream.js +++ b/ext/websocket/02_websocketstream.js @@ -190,15 +190,14 @@ const writable = new WritableStream({ write: async (chunk) => { if (typeof chunk === "string") { - await core.opAsync("op_ws_send", { - rid: this[_rid], + await core.opAsync("op_ws_send", this[_rid], { kind: "text", - text: chunk, + value: chunk, }); } else if (chunk instanceof Uint8Array) { - await core.opAsync("op_ws_send", { - rid: this[_rid], + await core.opAsync("op_ws_send", this[_rid], { kind: "binary", + value: chunk, }, chunk); } else { throw new TypeError( @@ -257,8 +256,7 @@ break; } case "ping": { - await core.opAsync("op_ws_send", { - rid: this[_rid], + await core.opAsync("op_ws_send", this[_rid], { kind: "pong", }); break; |
