This commit is contained in:
r58Playz 2024-10-09 12:58:14 -07:00
parent df33f81340
commit 1c0d8f8280
2 changed files with 2 additions and 4 deletions

View file

@ -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<Bytes>;

View file

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