diff options
| author | mat <github@matdoes.dev> | 2021-12-07 22:12:16 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2021-12-07 22:12:16 +0000 |
| commit | 4a44c58444c901d939a8594669c819ab2bfbac13 (patch) | |
| tree | 5085824e8af8bb9209f7defa178f1010fc29e436 /minecraft-protocol/src/packets/mod.rs | |
| parent | 9c14b3f32346f071ad12faf86105f5fd3ce03959 (diff) | |
| download | azalea-drasl-4a44c58444c901d939a8594669c819ab2bfbac13.tar.xz | |
keep doing packet stuff
Diffstat (limited to 'minecraft-protocol/src/packets/mod.rs')
| -rw-r--r-- | minecraft-protocol/src/packets/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/minecraft-protocol/src/packets/mod.rs b/minecraft-protocol/src/packets/mod.rs index 6a053124..8d943be0 100644 --- a/minecraft-protocol/src/packets/mod.rs +++ b/minecraft-protocol/src/packets/mod.rs @@ -2,6 +2,7 @@ mod client_intention_packet; pub use client_intention_packet::ClientIntentionPacket; mod serverbound_status_request_packet; pub use serverbound_status_request_packet::ServerboundStatusRequestPacket; +use tokio::io::AsyncRead; #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ConnectionProtocol { @@ -15,5 +16,6 @@ pub trait Packet { /// Get the id of the packet, this is always a byte. fn get_id(&self) -> u32; - fn write(&self, friendly_byte_buf: &mut Vec<u8>) -> (); + fn write(&self, buf: &mut Vec<u8>) -> (); + fn parse<T: AsyncRead + std::marker::Unpin>(&self, buf: T) -> (); } |
