From 498077e09f372ecd5c4f32f20363d7011f09e70a Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 17 Dec 2021 23:01:16 -0600 Subject: writing compressed packets --- azalea-protocol/src/connect.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-protocol/src/connect.rs') diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs index d3617b3f..3d910d3a 100644 --- a/azalea-protocol/src/connect.rs +++ b/azalea-protocol/src/connect.rs @@ -81,7 +81,7 @@ impl HandshakeConnection { /// Write a packet to the server pub async fn write(&mut self, packet: HandshakePacket) { - write_packet(packet, &mut self.stream).await; + write_packet(packet, &mut self.stream, None).await; } } @@ -92,7 +92,7 @@ impl GameConnection { /// Write a packet to the server pub async fn write(&mut self, packet: GamePacket) { - write_packet(packet, &mut self.stream).await; + write_packet(packet, &mut self.stream, self.compression_threshold).await; } } @@ -103,7 +103,7 @@ impl StatusConnection { /// Write a packet to the server pub async fn write(&mut self, packet: StatusPacket) { - write_packet(packet, &mut self.stream).await; + write_packet(packet, &mut self.stream, None).await; } } @@ -115,7 +115,7 @@ impl LoginConnection { /// Write a packet to the server pub async fn write(&mut self, packet: LoginPacket) { - write_packet(packet, &mut self.stream).await; + write_packet(packet, &mut self.stream, self.compression_threshold).await; } pub fn set_compression_threshold(&mut self, threshold: i32) { -- cgit v1.2.3