feat(prudp): clean up logging

This commit is contained in:
DJMrTV 2025-02-05 16:32:03 +01:00
commit e0669ddecc
2 changed files with 1 additions and 13 deletions

View file

@ -24,8 +24,6 @@ impl RMCProtocolServer{
return;
};
println!("recieved rmc message: {{ protocol: {}, method: {}}}", rmc.protocol_id, rmc.method_id);
for proto in &self.0 {
if let Some(response) = proto(&rmc, connection).await {
send_response(&packet, &socket, connection, response).await;

View file

@ -175,19 +175,17 @@ impl SocketData {
let mut connection = conn.lock().await;
if (packet.header.types_and_flags.get_flags() & ACK) != 0 {
info!("acknowledgement recieved");
//todo: handle acknowledgements and resending packets propperly
return;
}
if (packet.header.types_and_flags.get_flags() & MULTI_ACK) != 0 {
info!("acknowledgement recieved");
return;
}
match packet.header.types_and_flags.get_types() {
SYN => {
info!("got syn");
// reset heartbeat?
let mut response_packet = packet.base_response_packet();
@ -222,8 +220,6 @@ impl SocketData {
self.socket.send_to(&vec, client_address.regular_socket_addr).await.expect("failed to send data back");
}
CONNECT => {
info!("got connect");
let Some(MaximumSubstreamId(max_substream)) = packet.options.iter().find(|v| matches!(v, MaximumSubstreamId(_))) else {
return;
};
@ -307,8 +303,6 @@ impl SocketData {
return;
};
info!("ctr: {}, packet seq: {}", active_connection.reliable_client_counter, packet.header.sequence_id);
match active_connection.reliable_client_queue.binary_search_by_key(&packet.header.sequence_id, |p| p.header.sequence_id) {
Ok(_) => warn!("recieved packet twice"),
Err(position) => active_connection.reliable_client_queue.insert(position, packet.clone()),
@ -408,10 +402,6 @@ impl SocketData {
return;
};
info!("client disconnected");
let mut ack = packet.base_acknowledgement_packet();
ack.header.session_id = active_connection.server_session_id;