Skip to main content

oxigdal_websocket/client_sdk/
mod.rs

1//! Client SDK for WebSocket connections
2//!
3//! This module provides client-side SDKs for connecting to the WebSocket server
4//! including JavaScript/TypeScript client implementations.
5
6pub mod javascript;
7
8pub use javascript::{generate_javascript_client, generate_typescript_definitions};
9
10/// Client SDK configuration
11#[derive(Debug, Clone)]
12pub struct ClientSdkConfig {
13    /// Enable TypeScript definitions
14    pub enable_typescript: bool,
15    /// Enable reconnection logic
16    pub enable_reconnection: bool,
17    /// Enable client-side caching
18    pub enable_caching: bool,
19    /// Reconnection delay in milliseconds
20    pub reconnection_delay_ms: u64,
21    /// Maximum reconnection attempts
22    pub max_reconnection_attempts: u32,
23}
24
25impl Default for ClientSdkConfig {
26    fn default() -> Self {
27        Self {
28            enable_typescript: true,
29            enable_reconnection: true,
30            enable_caching: true,
31            reconnection_delay_ms: 1000,
32            max_reconnection_attempts: 10,
33        }
34    }
35}