pub fn receive(&mut self) {
        let packet = self.game_connection.game_socket.receive_packet_from_factory();
        match packet {
            Some(mut pkt) => {
                self.game_connection.cipher_data(&mut pkt.data, true);
                self.evaluate_packet(pkt);
            }
            None => { //todo: clean this spot up a bit???
                self.queue_recon(
                    self.recon.game_id,
                    self.recon.game_key.clone(),
                    self.recon.game_key_time,
                );
                self.disconnect();
                self.sleep_thread(1);
                return;
            }
        }
    }
/// Receives the packet from the server, return a packet enum
Receives the packet from the server, return a packet enum
Receives the packet from the server return a packet enum
pub fn receive(&mut self) {
        let packet = self.game_connection.game_socket.receive_packet_from_factory();
        match packet {
            Some(mut pkt) => {
                self.game_connection.cipher_data(&mut pkt.data, true);
                self.evaluate_packet(pkt);
            }
            None => { //todo: clean this spot up a bit???
                self.queue_recon(
                    self.recon.game_id,
                    self.recon.game_key.clone(),
                    self.recon.game_key_time,
                );
                self.disconnect();
                self.sleep_thread(1);
                return;
            }
        }
    }
pub fn receive ( & mut self ) { let packet = self . game_connection . game_socket . receive_packet_from_factory ( ) ; match packet { Some ( mut pkt ) => { self . game_connection . cipher_data ( & mut pkt . data , true ) ; self . evaluate_packet ( pkt ) ; } None => { //todo: clean this spot up a bit??? self . queue_recon ( self . recon . game_id , self . recon . game_key . clone ( ) , self . recon . game_key_time , ) ; self . disconnect ( ) ; self . sleep_thread ( 1 ) ; return ; } } }
Receives the packet from the server, return a packet enum
Receives the packet from the server return a packet enum
&mut self
&mut self