public function reloadServerTask($ip = "", $port = "")
{
$beformode = $this->getConnectMode();
if ($ip != "" && $port != "") {
$mode = array("type" => 2, "ip" => $ip, "port" => $port);
$this->changeMode($mode);
}
$this->guid = $this->generateGuid();
$packet = array('guid' => $this->guid, 'api' => array("cmd" => array('name' => "reloadTask", 'param' => array())), 'type' => DoraConst::SW_CONTROL_CMD);
$sendData = Packet::packEncode($packet);
$result = $this->doRequest($sendData, DoraConst::SW_MODE_WAITRESULT_SINGLE);
if ($this->guid != $result["guid"]) {
return Packet::packFormat("guid wront please retry..", 100100, $result["data"]);
}
//revert befor connect mode
if ($ip != "" && $port != "") {
//revert befor mode
$this->changeMode($beformode);
}
return $result["data"];
}