aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/connect.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-12-17 23:01:16 -0600
committermat <github@matdoes.dev>2021-12-17 23:01:16 -0600
commit498077e09f372ecd5c4f32f20363d7011f09e70a (patch)
tree6098f89e93319880cb7eeeb9dddf9d52b94771d4 /azalea-protocol/src/connect.rs
parent493aae582adbf818dc4cfdbd0390961d36647d77 (diff)
downloadazalea-drasl-498077e09f372ecd5c4f32f20363d7011f09e70a.tar.xz
writing compressed packets
Diffstat (limited to 'azalea-protocol/src/connect.rs')
-rw-r--r--azalea-protocol/src/connect.rs8
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) {