rs_pkg/network/websocket/client/
config.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Deserialize, Serialize)]
4pub struct Config {
5    pub addr: String,
6    pub reconnect: bool,
7    pub ping_interval: String,
8}
9
10impl Default for Config {
11    fn default() -> Self {
12        Self {
13            addr: "ws://localhost:8080/ws".to_string(),
14            reconnect: true,
15            ping_interval: "3s".to_string(),
16        }
17    }
18}