PHPDaemon\Clients\XMPP\Connection::ping PHP Method

ping() public method

public ping ( string $to = null, callable $cb = null ) : boolean
$to string
$cb callable
return boolean
    public function ping($to = null, $cb = null)
    {
        if (!isset($this->xml)) {
            return false;
        }
        if ($to === null) {
            $to = $this->host;
        }
        //Daemon::log('Sending ping to '.$to);
        return $this->iqGetTo($to, '<ping xmlns="urn:xmpp:ping"/>', $cb);
    }