- add: logout grpc function
- add: logout packet handler - add: connection state and service for storing connection data - add: session service calls to auth-service - fix: compile error on database service due to moved redis cache
This commit is contained in:
20
packet-service/src/connection_state.rs
Normal file
20
packet-service/src/connection_state.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct ConnectionState {
|
||||
pub user_id: Option<i32>,
|
||||
pub session_id: Option<String>,
|
||||
pub character_id: Option<i32>,
|
||||
pub additional_data: HashMap<String, String>, // Flexible data storage
|
||||
}
|
||||
|
||||
impl ConnectionState {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
user_id: None,
|
||||
session_id: None,
|
||||
character_id: None,
|
||||
additional_data: HashMap::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user