aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-04-30 01:50:53 -0500
committermat <github@matdoes.dev>2022-04-30 01:50:53 -0500
commitc37fcfe4da7a55208bf8241c7a776905513d5e0e (patch)
tree3bee2ee06ee97dc2fdb7c60e7e907546f218af5b /azalea-protocol
parent4d7bf6c50eda970ac4998f10f5e46006dffb6ca2 (diff)
downloadazalea-drasl-c37fcfe4da7a55208bf8241c7a776905513d5e0e.tar.xz
comment some stuff out
Diffstat (limited to 'azalea-protocol')
-rwxr-xr-xazalea-protocol/src/read.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs
index 4f8b52af..b249e3d7 100755
--- a/azalea-protocol/src/read.rs
+++ b/azalea-protocol/src/read.rs
@@ -138,22 +138,29 @@ pub async fn read_packet<'a, P: ProtocolPacket, R>(
where
R: AsyncRead + std::marker::Unpin + std::marker::Send + std::marker::Sync,
{
+ // let start_time = std::time::Instant::now();
+
+ // println!("decrypting packet ({}ms)", start_time.elapsed().as_millis());
// if we were given a cipher, decrypt the packet
let mut encrypted_stream = EncryptedStream {
cipher: Cell::new(cipher),
stream: &mut Pin::new(stream),
};
+ // println!("splitting packet ({}ms)", start_time.elapsed().as_millis());
let mut buf = frame_splitter(&mut encrypted_stream).await?;
if let Some(compression_threshold) = compression_threshold {
+ // println!(
+ // "decompressing packet ({}ms)",
+ // start_time.elapsed().as_millis()
+ // );
buf = compression_decoder(&mut buf.as_slice(), compression_threshold).await?;
}
- let start_time = std::time::Instant::now();
- println!("decoding packet");
+ // println!("decoding packet ({}ms)", start_time.elapsed().as_millis());
let packet = packet_decoder(&mut buf.as_slice(), flow).await?;
- println!("decoded packet in {}ms", start_time.elapsed().as_millis());
+ // println!("decoded packet ({}ms)", start_time.elapsed().as_millis());
Ok(packet)
}