exp backoff and theads handling

This commit is contained in:
TIBERGHIEN corentin
2026-01-20 01:10:09 +01:00
parent 08518892f2
commit dacedd1ceb
9 changed files with 469 additions and 331 deletions

View File

@@ -60,7 +60,7 @@ pub async fn perform_handshake(
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 {
@@ -73,12 +73,11 @@ pub async fn perform_handshake(
let hello_handshake = construct_message(1, payload, id, crypto_pair);
match hello_handshake {
Some(handshake_message) => {
senders.send_via(
0,
senders.send_dispatch(
handshake_message,
sockaddr_bytes.to_string(),
is_server_handshake,
messages_list,
sd.messages_list(),
);
}
None => {}