pub struct ServerConfig {
pub listen_addr: String,
pub server_ver: i32,
pub login_user_id: u64,
pub keepalive_interval: i32,
pub rsa_private_key: Option<String>,
}Expand description
服务端配置
Fields§
§listen_addr: StringTCP 监听地址(如 127.0.0.1:11111)
server_ver: i32服务端版本号,InitConnect 响应下发给客户端
login_user_id: u64服务端登录 user_id,InitConnect 响应下发给客户端
keepalive_interval: i32KeepAlive 心跳间隔(秒),InitConnect 响应下发给客户端
rsa_private_key: Option<String>RSA 私钥 PEM 内容(可选,启用后 InitConnect 使用 RSA 加解密)
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more