pub struct LoginResult {
pub user_id: u64,
pub session_key: Vec<u8>,
pub keep_alive_interval: u32,
pub sec_data: u32,
pub server_time: u64,
pub client_ip: String,
}Expand description
登录结果
Fields§
§user_id: u64§session_key: Vec<u8>RspEncryptData.session_key 原始字节 —— 长度由服务端决定,对齐 C++
Logger::session_key_ 是 std::string(logger.h:152)变长存储。
Platform 通常 16 字节,Broker 可能 32 字节,不能强制截断。
keep_alive_interval: u32§sec_data: u32§server_time: u64§client_ip: StringRspEncryptData.client_ip(field 14), server 视角的客户端外网 IP。
Ref: FTLogin FTConnLogin.proto:105 + logger.cpp:511-516。
C++ 会把它保存到 working_tcp_client->client_ip,并在 broker CMD20147
ConnIpReq.client_feature.client_ip 中回填;broker 1007 会严格校验。
Trait Implementations§
Source§impl Clone for LoginResult
impl Clone for LoginResult
Source§fn clone(&self) -> LoginResult
fn clone(&self) -> LoginResult
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 LoginResult
impl RefUnwindSafe for LoginResult
impl Send for LoginResult
impl Sync for LoginResult
impl Unpin for LoginResult
impl UnsafeUnpin for LoginResult
impl UnwindSafe for LoginResult
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