rs_pkg/network/websocket/server/config.rs
1use serde::{Deserialize, Serialize};
2
3#[derive(Deserialize, Serialize)]
4pub struct Config {
5 pub is_router: bool,
6 pub host: String,
7 pub port: u16,
8 pub msg_buf: usize,
9}
10
11impl Default for Config {
12 fn default() -> Self {
13 Self {
14 is_router: false,
15 host: "127.0.0.1".to_string(),
16 port: 8080,
17 msg_buf: 100,
18 }
19 }
20}