From 1c0d8f8280e70c659be47d5aab4966c60954524f Mon Sep 17 00:00:00 2001 From: r58Playz Date: Wed, 9 Oct 2024 12:58:14 -0700 Subject: [PATCH] fix --- client/src/lib.rs | 2 -- client/src/utils.rs | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/client/src/lib.rs b/client/src/lib.rs index 7c62f67..fbec07c 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -42,7 +42,6 @@ use wisp_mux::{ ws::{WebSocketRead, WebSocketWrite}, CloseReason, }; -use ws_wrapper::WebSocketWrapper; #[cfg(feature = "full")] mod io_stream; @@ -51,7 +50,6 @@ mod tokioio; mod utils; #[cfg(feature = "full")] mod websocket; -mod ws_wrapper; type HttpBody = http_body_util::Full; diff --git a/client/src/utils.rs b/client/src/utils.rs index 4ac6051..5102de3 100644 --- a/client/src/utils.rs +++ b/client/src/utils.rs @@ -383,7 +383,7 @@ class WebSocketStreamPonyfill { } this.url = url; const ws = new WebSocket(url, options.protocols ?? []); - ws.binaryType = "arrayBuffer"; + ws.binaryType = "arraybuffer"; const closeWithInfo = ({ closeCode: code, reason } = {}) => ws.close(code, reason); this.opened = new Promise((resolve, reject) => { ws.onopen = () => { @@ -464,7 +464,7 @@ async function websocket_connect(url, protocols) { return {read: readable, write: writable}; } -function bind_ws_connect(url, protocols) { +export function bind_ws_connect(url, protocols) { return websocket_connect.bind(undefined, url, protocols); } "#)]