minecraft-server-ping
    Preparing search index...

    Function srvRecordsResult

    • Resolves the SRV records for the given service name.

      Parameters

      • srv: string

        The service name to resolve.

      Returns Promise<IResult<[SrvRecord, ...SrvRecord[]], ErrnoException>>

      A promise of Result that resolves to an array of SRV records.

      const res = await srvRecordsResult('_minecraft._tcp.example.com');
      if (res.isOk) {
      console.log(res.ok()); // [ { name: 'example.com', port: 25565, priority: 0, weight: 5 } ]
      } else {
      console.error(res.err());
      }