diff options
| author | mat <github@matdoes.dev> | 2022-01-02 00:03:04 -0600 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-01-02 00:03:04 -0600 |
| commit | 3ec7352da2c8a9870718e6a81913f6aa1b576b95 (patch) | |
| tree | 9b067763246eb43fb5928eeacf7aed18e9e90236 /azalea-protocol/src/packets/handshake | |
| parent | a1afbb6031527c1db5831fc8e916bc0ecce633b4 (diff) | |
| download | azalea-drasl-3ec7352da2c8a9870718e6a81913f6aa1b576b95.tar.xz | |
add macro for a couple more packets
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())?, -// }, -// )) -// } -// } |
