Standard/TeamSpeak/TeamSpeak3/Node/Host.php
public function serverGetByTSDNS($tsdns)
  {
    $parts = \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Uri::getFQDNParts($tsdns);
    $query = \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String::factory(array_shift($parts));

    while($part = array_shift($parts))
    {
      $query->prepend($part);

      try
      {
        $port = \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\TeamSpeak3::factory("tsdns://" . $query . "/?timeout=3")->resolve($tsdns)->section(":", 1);

        return $this->serverGetByPort($port == "" ? 9987 : $port);
      }
      catch(\ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Transport\Exception $e)
      {
        /* skip "Connection timed out" and "Connection refused" */
        if($e->getCode() != 10060 && $e->getCode() != 10061) throw $e;
      }
    }

    throw new \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Adapter\ServerQuery\Exception("invalid serverID", 0x400);
  }
public function serverGetByTSDNS($tsdns)
  {
    $parts = \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\Uri::getFQDNParts($tsdns);
    $query = \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Helper\String::factory(array_shift($parts));

    while($part = array_shift($parts))
    {
      $query->prepend($part);

      try
      {
        $port = \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\TeamSpeak3::factory("tsdns://" . $query . "/?timeout=3")->resolve($tsdns)->section(":", 1);

        return $this->serverGetByPort($port == "" ? 9987 : $port);
      }
      catch(\ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Transport\Exception $e)
      {
        /* skip "Connection timed out" and "Connection refused" */
        if($e->getCode() != 10060 && $e->getCode() != 10061) throw $e;
      }
    }

    throw new \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Adapter\ServerQuery\Exception("invalid serverID", 0x400);
  }
Returns the first TeamSpeak3_Node_Server object matching the given TSDNS hostname. Like the
TeamSpeak 3 Client, this method will start looking for a TSDNS server on the second-level
domain including a fallback to the third-level domain of the specified $tsdns parameter.

@param  string $tsdns
@throws \ManiaLivePlugins\Standard\TeamSpeak\TeamSpeak3\Adapter\ServerQuery\Exception
@return Server