pub async fn write_packet<P, W>( packet: &P, stream: &mut W, compression_threshold: Option<u32>, cipher: &mut Option<Aes128CfbEnc>, ) -> Result<()>where P: ProtocolPacket + Debug, W: AsyncWrite + Unpin + Send,