diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2022-05-02 03:10:52 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-02 03:10:52 +0000 |
| commit | 728f0399ff1a03f5ce8134b46e6150daf1e2076d (patch) | |
| tree | 5a21ef239d8e5cabdc0b5d3d511e35dc25435041 /azalea-protocol/src/packets/handshake | |
| parent | c2262a212328e7a9e00091d7b41a8d8bfb5b3007 (diff) | |
| parent | e1b6bc965a3f71d64b4dc3075da21c578ab5b508 (diff) | |
| download | azalea-drasl-728f0399ff1a03f5ce8134b46e6150daf1e2076d.tar.xz | |
Merge pull request #4 from mat-1/sync-decoding
Reduce usage of AsyncRead
Diffstat (limited to 'azalea-protocol/src/packets/handshake')
| -rwxr-xr-x | azalea-protocol/src/packets/handshake/client_intention_packet.rs | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/azalea-protocol/src/packets/handshake/client_intention_packet.rs b/azalea-protocol/src/packets/handshake/client_intention_packet.rs index a92d65f6..6216ddc4 100755 --- a/azalea-protocol/src/packets/handshake/client_intention_packet.rs +++ b/azalea-protocol/src/packets/handshake/client_intention_packet.rs @@ -1,9 +1,7 @@ -use crate::{mc_buf::Writable, packets::ConnectionProtocol}; +use crate::packets::ConnectionProtocol; use packet_macros::HandshakePacket; use std::hash::Hash; -use super::HandshakePacket; - #[derive(Hash, Clone, Debug, HandshakePacket)] pub struct ClientIntentionPacket { #[varint] @@ -12,23 +10,3 @@ pub struct ClientIntentionPacket { pub port: u16, pub intention: ConnectionProtocol, } - -// impl ClientIntentionPacket { -// pub fn get(self) -> HandshakePacket { -// HandshakePacket::ClientIntentionPacket(self) -// } - -// pub fn write(&self, buf: &mut Vec<u8>) -> Result<(), std::io::Error> { -// buf.write_varint(self.protocol_version as i32)?; -// buf.write_utf(&self.hostname)?; -// buf.write_short(self.port as i16)?; -// buf.write_varint(self.intention as i32)?; -// Ok(()) -// } - -// pub async fn read<T: tokio::io::AsyncRead + std::marker::Unpin + std::marker::Send>( -// buf: &mut T, -// ) -> Result<HandshakePacket, String> { -// todo!() -// } -// } |
