mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-13 06:20:02 -04:00
fix
This commit is contained in:
parent
df33f81340
commit
1c0d8f8280
2 changed files with 2 additions and 4 deletions
|
@ -42,7 +42,6 @@ use wisp_mux::{
|
||||||
ws::{WebSocketRead, WebSocketWrite},
|
ws::{WebSocketRead, WebSocketWrite},
|
||||||
CloseReason,
|
CloseReason,
|
||||||
};
|
};
|
||||||
use ws_wrapper::WebSocketWrapper;
|
|
||||||
|
|
||||||
#[cfg(feature = "full")]
|
#[cfg(feature = "full")]
|
||||||
mod io_stream;
|
mod io_stream;
|
||||||
|
@ -51,7 +50,6 @@ mod tokioio;
|
||||||
mod utils;
|
mod utils;
|
||||||
#[cfg(feature = "full")]
|
#[cfg(feature = "full")]
|
||||||
mod websocket;
|
mod websocket;
|
||||||
mod ws_wrapper;
|
|
||||||
|
|
||||||
type HttpBody = http_body_util::Full<Bytes>;
|
type HttpBody = http_body_util::Full<Bytes>;
|
||||||
|
|
||||||
|
|
|
@ -383,7 +383,7 @@ class WebSocketStreamPonyfill {
|
||||||
}
|
}
|
||||||
this.url = url;
|
this.url = url;
|
||||||
const ws = new WebSocket(url, options.protocols ?? []);
|
const ws = new WebSocket(url, options.protocols ?? []);
|
||||||
ws.binaryType = "arrayBuffer";
|
ws.binaryType = "arraybuffer";
|
||||||
const closeWithInfo = ({ closeCode: code, reason } = {}) => ws.close(code, reason);
|
const closeWithInfo = ({ closeCode: code, reason } = {}) => ws.close(code, reason);
|
||||||
this.opened = new Promise((resolve, reject) => {
|
this.opened = new Promise((resolve, reject) => {
|
||||||
ws.onopen = () => {
|
ws.onopen = () => {
|
||||||
|
@ -464,7 +464,7 @@ async function websocket_connect(url, protocols) {
|
||||||
return {read: readable, write: writable};
|
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);
|
return websocket_connect.bind(undefined, url, protocols);
|
||||||
}
|
}
|
||||||
"#)]
|
"#)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue