protected static function initHostByData($rs)
{
$host = new Host();
$host->group = $rs['group'];
$host->id = $rs['id'];
$host->ip = $rs['ip'];
$host->port = $rs['port'];
$host->key = $rs['key'];
$host->workerNum = $rs['worker_num'];
$host->encrypt = $rs['encrypt'] ? true : false;
if (self::$isRegisterServer) {
$host->fd = $rs['fd'];
$host->fromId = $rs['from_id'];
$host->removed = $rs['removed'];
}
return $host;
}