- add: join server handler

- add: validate session function to validate the session status
This commit is contained in:
2024-12-21 15:39:51 -05:00
parent 069a471bbb
commit f55ca79410
3 changed files with 36 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ pub async fn route_packet(stream: &mut TcpStream, packet: Packet, auth_client: A
match packet.packet_type {
PacketType::PakcsAlive => Ok(()),
PacketType::PakcsAcceptReq => auth::handle_accept_req(stream, packet).await,
PacketType::PakcsJoinServerTokenReq => auth::handle_join_server_req(stream, packet).await,
PacketType::PakcsJoinServerTokenReq => auth::handle_join_server_req(stream, packet, auth_client, connection_service, connection_id).await,
// Login Stuff
PacketType::PakcsLoginTokenReq => auth::handle_login_req(stream, packet, auth_client, connection_service, connection_id, stream.peer_addr()?).await,
PacketType::PakcsLogoutReq => auth::handle_logout_req(stream, packet, auth_client, connection_service, connection_id).await,