private function authorize()
    {
        $this->writePacket(self::PACKET_AUTHORIZE, self::SERVERDATA_AUTH, $this->password);
        $response_packet = $this->readPacket();

        if ($response_packet['type'] == self::SERVERDATA_AUTH_RESPONSE) {
            if ($response_packet['id'] == self::PACKET_AUTHORIZE) {
                $this->authorized = true;

                return true;
            }
        }

        $this->disconnect();
        return false;
    }
private function authorize()
    {
        $this->writePacket(self::PACKET_AUTHORIZE, self::SERVERDATA_AUTH, $this->password);
        $response_packet = $this->readPacket();

        if ($response_packet['type'] == self::SERVERDATA_AUTH_RESPONSE) {
            if ($response_packet['id'] == self::PACKET_AUTHORIZE) {
                $this->authorized = true;

                return true;
            }
        }

        $this->disconnect();
        return false;
    }
private function authorize ( ) { $ this -> writePacket ( self :: PACKET_AUTHORIZE , self :: SERVERDATA_AUTH , $ this -> password ) ; $ response_packet = $ this -> readPacket ( ) ; if ( $ response_packet [ 'type' ] == self :: SERVERDATA_AUTH_RESPONSE ) { if ( $ response_packet [ 'id' ] == self :: PACKET_AUTHORIZE ) { $ this -> authorized = true ; return true ; } } $ this -> disconnect ( ) ; return false ; }
Log into the server with the given credentials.

@return boolean
Log into the server with the given credentials .