private function assertValidClientID($value, $fromPacket)
    {

        if (strlen($value) > 23) {
            $this->throwException(
                sprintf(
                    'Expected client id shorter than 24 bytes but got "%s".',
                    $value
                ),
                $fromPacket
            );
        }

        if ($value !== '' && !ctype_alnum($value)) {
            $this->throwException(
                sprintf(
                    'Expected a client id containing characters 0-9, a-z or A-Z but got "%s".',
                    $value
                ),
                $fromPacket
            );
        }
    }