diff options
| author | mat <github@matdoes.dev> | 2021-12-17 23:01:16 -0600 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2021-12-17 23:01:16 -0600 |
| commit | 498077e09f372ecd5c4f32f20363d7011f09e70a (patch) | |
| tree | 6098f89e93319880cb7eeeb9dddf9d52b94771d4 /azalea-protocol/src/connect.rs | |
| parent | 493aae582adbf818dc4cfdbd0390961d36647d77 (diff) | |
| download | azalea-drasl-498077e09f372ecd5c4f32f20363d7011f09e70a.tar.xz | |
writing compressed packets
Diffstat (limited to 'azalea-protocol/src/connect.rs')
| -rw-r--r-- | azalea-protocol/src/connect.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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) { |
