diff options
| author | mat <github@matdoes.dev> | 2021-12-11 15:17:42 -0600 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2021-12-11 15:17:42 -0600 |
| commit | ba911a8a207eb47df7a055410570767b2e33c2ae (patch) | |
| tree | 4a53d384f08b7272ba287bdb326f3d7fcb09f289 /minecraft-protocol/src/connection.rs | |
| parent | 6026c74430f311c9217b77e7ac07d183efde5bce (diff) | |
| download | azalea-drasl-ba911a8a207eb47df7a055410570767b2e33c2ae.tar.xz | |
correct minecraft-chat :tada:
Diffstat (limited to 'minecraft-protocol/src/connection.rs')
| -rw-r--r-- | minecraft-protocol/src/connection.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/minecraft-protocol/src/connection.rs b/minecraft-protocol/src/connection.rs index cfca403c..2fe03dfb 100644 --- a/minecraft-protocol/src/connection.rs +++ b/minecraft-protocol/src/connection.rs @@ -45,7 +45,7 @@ impl Connection { self.state = state; } - pub async fn read_packet(&mut self) -> Result<(), String> { + pub async fn read_packet(&mut self) -> Result<Packet, String> { // what this does: // 1. reads the first 5 bytes, probably only some of this will be used to get the packet length // 2. how much we should read = packet length - 5 @@ -69,9 +69,7 @@ impl Connection { ) .await?; - println!("packet: {:?}", packet); - - Ok(()) + Ok(packet) } /// Write a packet to the server |
