fix muxstreamasyncread

This commit is contained in:
Toshit Chawda 2024-07-11 16:15:37 -07:00
parent 5571a63f40
commit 31b9f1c455
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
8 changed files with 187 additions and 49 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "epoxy-client"
version = "2.0.6"
version = "2.0.7"
edition = "2021"
[lib]

View file

@ -1,6 +1,6 @@
{
"name": "@mercuryworkshop/epoxy-tls",
"version": "2.0.6-1",
"version": "2.0.7-1",
"description": "A wasm library for using raw encrypted tls/ssl/https/websocket streams on the browser",
"scripts": {
"build": "./build.sh"

View file

@ -1,6 +1,5 @@
use std::{pin::Pin, sync::Arc, task::Poll};
use bytes::Bytes;
use futures_rustls::{
rustls::{ClientConfig, RootCertStore},
TlsConnector, TlsStream,
@ -17,7 +16,7 @@ use wasm_bindgen::{JsCast, JsValue};
use wasm_bindgen_futures::spawn_local;
use wisp_mux::{
extensions::{udp::UdpProtocolExtensionBuilder, ProtocolExtensionBuilder},
ClientMux, IoStream, MuxStreamIo, StreamType,
ClientMux, MuxStreamAsyncRW, MuxStreamIo, StreamType,
};
use crate::{ws_wrapper::WebSocketWrapper, EpoxyClientOptions, EpoxyError};
@ -49,7 +48,7 @@ pub struct StreamProvider {
}
pub type ProviderUnencryptedStream = MuxStreamIo;
pub type ProviderUnencryptedAsyncRW = IoStream<ProviderUnencryptedStream, Bytes>;
pub type ProviderUnencryptedAsyncRW = MuxStreamAsyncRW;
pub type ProviderTlsAsyncRW = TlsStream<ProviderUnencryptedAsyncRW>;
pub type ProviderAsyncRW = Either<ProviderTlsAsyncRW, ProviderUnencryptedAsyncRW>;