Ejemplo n.º 1
0
        public DNSResponse Query(string name, QType qtype, int timeout, List <IPEndPoint> dnsServers)
        {
            Question    question = new Question(name, qtype, QClass.IN);
            DNSResponse response = SearchInCache(question);

            if (response != null)
            {
                return(response);
            }

            DNSRequest request = new DNSRequest();

            request.AddQuestion(question);
            return(GetResponse(request, dnsServers, timeout));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Do Query on specified DNS servers
        /// </summary>
        /// <param name="name">Name to query</param>
        /// <param name="qtype">Question type</param>
        /// <param name="timeout">Timeout for lookup in seconds.</param>
        /// <param name="qclass">Class type</param>
        /// <returns>Response of the query</returns>
        public DNSResponse Query(string name, QType qtype, QClass qclass, int timeout)
        {
            Question    question = new Question(name, qtype, qclass);
            DNSResponse response = SearchInCache(question);

            if (response != null)
            {
                return(response);
            }

            DNSRequest request = new DNSRequest();

            request.AddQuestion(question);
            return(GetResponse(request, m_DnsServers, timeout));
        }
Ejemplo n.º 3
0
        public DNSResponse Query(string name, DNSQType qtype, int timeout, List<IPEndPoint> dnsServers)
        {
            Question question = new Question(name, qtype, QClass.IN);
            DNSResponse response = SearchInCache(question);
            if (response != null)
                return response;

            DNSRequest request = new DNSRequest();
            request.AddQuestion(question);
            return GetResponse(request, dnsServers, timeout);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Do Query on specified DNS servers
        /// </summary>
        /// <param name="name">Name to query</param>
        /// <param name="qtype">Question type</param>
        /// <param name="timeout">Timeout for lookup in seconds.</param>
        /// <param name="qclass">Class type</param>
        /// <returns>Response of the query</returns>
        public DNSResponse Query(string name, DNSQType qtype, QClass qclass, int timeout)
        {
            Question question = new Question(name, qtype, qclass);
            DNSResponse response = SearchInCache(question);
            if (response != null)
                return response;

            DNSRequest request = new DNSRequest();
            request.AddQuestion(question);
            return GetResponse(request, m_DnsServers, timeout);
        }