Class DnsResolver

    • Method Detail

      • resolveSRV

        public static List<SrvRecord> resolveSRV​(CharSequence service,
                                                 CharSequence domain,
                                                 String nameServer,
                                                 long timeout)
                                          throws IOException
        Resolves DNS SRV records for the given domain.

        The service is "xmpp-client", the protocol is "tcp", resulting in a query of _xmpp-client._tcp.domain.

        Parameters:
        service - The service, usually "xmpp-client" or "xmpps-client".
        domain - The domain.
        nameServer - The name server.
        timeout - The timeout.
        Returns:
        The DNS SRV records.
        Throws:
        IOException - If a timeout occurs or no connection to the DNS server can be established.
        See Also:
        RFC 6120 3.2.1. Preferred Process: SRV Lookup