public function asArray()
{
$arr = ['group' => $this->group, 'id' => $this->id, 'ip' => $this->ip, 'port' => $this->port, 'key' => $this->key, 'worker_num' => $this->workerNum, 'encrypt' => $this->encrypt ? 1 : 0];
if (self::$isRegisterServer) {
$arr['fd'] = $this->fd;
$arr['from_id'] = $this->fromId;
$arr['removed'] = $this->removed;
}
return $arr;
}