diff options
Diffstat (limited to 'azalea-protocol/src/packets/handshake')
| -rw-r--r-- | azalea-protocol/src/packets/handshake/client_intention_packet.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/azalea-protocol/src/packets/handshake/client_intention_packet.rs b/azalea-protocol/src/packets/handshake/client_intention_packet.rs index b3eb8301..00d124a4 100644 --- a/azalea-protocol/src/packets/handshake/client_intention_packet.rs +++ b/azalea-protocol/src/packets/handshake/client_intention_packet.rs @@ -14,35 +14,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>) { -// buf.write_varint(self.protocol_version as i32).unwrap(); -// buf.write_utf(&self.hostname).unwrap(); -// buf.write_short(self.port).unwrap(); -// buf.write_varint(self.intention.clone() as i32).unwrap(); -// } - -// pub async fn read<T: tokio::io::AsyncRead + std::marker::Unpin + std::marker::Send>( -// buf: &mut T, -// ) -> Result<HandshakePacket, String> { -// let protocol_version = buf.read_varint().await? as u32; -// let hostname = buf.read_utf().await?; -// let port = buf.read_short().await? as u16; -// let intention = buf.read_varint().await?; - -// Ok(HandshakePacket::ClientIntentionPacket( -// ClientIntentionPacket { -// protocol_version, -// hostname, -// port, -// intention: ConnectionProtocol::from_i32(intention) -// .ok_or_else(|| "Invalid intention".to_string())?, -// }, -// )) -// } -// } |
