Skip to content

Commit e2fa4e8

Browse files
committed
Add packet logging for debugging
1 parent 5d2146c commit e2fa4e8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/protocol/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,10 @@ impl Conn {
923923
Direction::Serverbound => Direction::Clientbound,
924924
};
925925

926+
println!("about to parse id={:x}, dir={:?} state={:?}", id, dir, self.state);
927+
std::fs::File::create("/tmp/p")?.write_all(buf.get_ref())?;
926928
let packet = packet::packet_by_id(self.protocol_version, self.state, dir, id, &mut buf)?;
929+
println!("packet = {:?}", packet);
927930

928931
match packet {
929932
Some(val) => {

0 commit comments

Comments
 (0)