Skip to content

Commit

Permalink
add connected info!
Browse files Browse the repository at this point in the history
  • Loading branch information
yngrtc committed Mar 1, 2024
1 parent 2eb24ab commit ccdd11d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/states.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::endpoint::{
use crate::server::config::ServerConfig;
use crate::session::{config::SessionConfig, Session};
use crate::types::{EndpointId, FourTuple, SessionId, UserName};
use log::info;
use shared::error::{Error, Result};
use std::collections::hash_map::Entry;
use std::collections::HashMap;
Expand Down Expand Up @@ -180,6 +181,10 @@ impl ServerStates {
endpoint_id: EndpointId,
) {
self.endpoints.insert(four_tuple, (session_id, endpoint_id));
info!(
"endpoint {}/{} is connected via {:?}",
session_id, endpoint_id, four_tuple
)
}

pub(crate) fn remove_endpoint(&mut self, four_tuple: &FourTuple) {
Expand Down

0 comments on commit ccdd11d

Please sign in to comment.