我正在尝试使用 jaxl 3.0 通过 xmpp 进行通知。唯一的事情,我无法理解 - 工作完成后如何关闭 JAXL 服务器?看不到任何停止 jaxl-server 的回调
这是我的代码的一部分
public function __construct(JAXL $jaxl){
$this->client=$jaxl;
$this->client->add_cb('on_auth_success', array($this,'send'));
}
public function setSenders($senders){
$this->senders=$senders;
}
public function addLine($messagePart){
$this->message.=$messagePart.PHP_EOL;
}
public function notify(){
$this->client->start();
}
public function send(){
foreach($this->senders as $sender){
$this->client->send_chat_msg($sender,$this->message);
}
//Here server should be stopped. Everything is done.
}