root request

This commit is contained in:
TIBERGHIEN corentin
2026-01-13 17:13:35 +01:00
parent 98fcc1a0b2
commit c852c5bb4a
6 changed files with 210 additions and 78 deletions

View File

@@ -75,13 +75,14 @@ pub async fn perform_handshake(
username: String,
ip: String,
event_tx: Sender<NetworkEvent>,
is_server_handshake: bool,
) {
println!("username: {}, ip: {}", username.clone(), ip.clone());
let crypto_pair = sd.cryptopair_ref();
let senders = sd.senders_ref();
let messages_list = sd.messages_list_ref();
let id = generate_id();
let server_addr_query = get_socket_address(username.clone(), ip.clone());
match server_addr_query.await {
Ok(sockaddr_bytes) => {
match String::from_utf8(sockaddr_bytes.to_vec()) {
@@ -100,7 +101,7 @@ pub async fn perform_handshake(
0,
handshake_message,
first.to_string(),
false,
is_server_handshake,
messages_list,
);
}