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); } "#)]