public function getConnectMode()
{
switch ($this->connectMode) {
case 1:
return array("type" => 1, "group" => $this->connectGroup, "ip" => $this->connectIp, "port" => $this->connectPort);
break;
case 2:
return array("type" => 2, "group" => "", "ip" => $this->connectIp, "port" => $this->connectPort);
break;
default:
throw new \Exception("current connect mode is unknow", -1);
break;
}
}