function event_socket_request($fp, $cmd) { $esl = new event_socket($fp); $result = $esl->request($cmd); $esl->reset_fp(); return $result; }
protected function event_socket_request($cmd) { $esl = new event_socket($this->event_socket); $result = $esl->request($cmd); $esl->reset_fp(); return $result; }
protected function restart_switch() { $esl = new event_socket(); if (!$esl->connect($this->global_settings->switch_event_host(), $this->global_settings->switch_event_port(), $this->global_settings->switch_event_password())) { throw new Exception("Failed to connect to switch"); } if (!$esl->request('api fsctl shutdown restart elegant')) { throw new Exception("Failed to send switch restart"); } $esl->reset_fp(); }