Skip to main content

cdk_http_client/ws/
mod.rs

1//! WebSocket client abstraction for CDK
2//!
3//! Provides a platform-agnostic WebSocket client. On native targets this uses
4//! `tokio-tungstenite`; on WASM it uses `ws_stream_wasm`.
5
6mod error;
7#[cfg(not(target_arch = "wasm32"))]
8mod native;
9#[cfg(target_arch = "wasm32")]
10mod wasm;
11
12pub use error::WsError;
13#[cfg(not(target_arch = "wasm32"))]
14pub use native::{connect, WsReceiver, WsSender};
15#[cfg(target_arch = "wasm32")]
16pub use wasm::{connect, WsReceiver, WsSender};