diff options
Diffstat (limited to 'net/src/stream')
-rw-r--r-- | net/src/stream/websocket.rs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/net/src/stream/websocket.rs b/net/src/stream/websocket.rs index eb4de21..9f4da46 100644 --- a/net/src/stream/websocket.rs +++ b/net/src/stream/websocket.rs @@ -10,21 +10,19 @@ use futures_util::{ }; use pin_project_lite::pin_project; -#[cfg(all(feature = "smol", feature = "tls"))] -use futures_rustls::TlsStream; -#[cfg(all(feature = "tokio", feature = "tls"))] -use tokio_rustls::TlsStream; - -use karyon_core::async_runtime::net::TcpStream; - -use crate::{codec::WebSocketCodec, Error, Result}; - #[cfg(feature = "tokio")] type WebSocketStream<T> = async_tungstenite::WebSocketStream<async_tungstenite::tokio::TokioAdapter<T>>; #[cfg(feature = "smol")] use async_tungstenite::WebSocketStream; +use karyon_core::async_runtime::net::TcpStream; + +#[cfg(feature = "tls")] +use crate::async_rustls::TlsStream; + +use crate::{codec::WebSocketCodec, Error, Result}; + pub struct WsStream<C> { inner: InnerWSConn, codec: C, |