IDnsServer: added new DirectQueryAsync() method.

This commit is contained in:
Shreyas Zare
2023-02-18 11:50:05 +05:30
parent df9373f598
commit 0e66b3908a

View File

@@ -1,6 +1,6 @@
/* /*
Technitium DNS Server Technitium DNS Server
Copyright (C) 2022 Shreyas Zare (shreyas@technitium.com) Copyright (C) 2023 Shreyas Zare (shreyas@technitium.com)
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -33,10 +33,20 @@ namespace DnsServerCore.ApplicationCommon
/// Allows querying the DNS server core directly. This call supports recursion even if its not enabled in the DNS server configuration. The request wont be routed to any of the installed DNS Apps except for processing APP records. The request and its response are not counted in any stats or logged. /// Allows querying the DNS server core directly. This call supports recursion even if its not enabled in the DNS server configuration. The request wont be routed to any of the installed DNS Apps except for processing APP records. The request and its response are not counted in any stats or logged.
/// </summary> /// </summary>
/// <param name="question">The question record containing the details to query.</param> /// <param name="question">The question record containing the details to query.</param>
/// <param name="timeout">The timeout value in milliseconds to wait for response.</param>
/// <returns>The DNS response for the DNS query.</returns> /// <returns>The DNS response for the DNS query.</returns>
/// <exception cref="TimeoutException">When request times out.</exception> /// <exception cref="TimeoutException">When request times out.</exception>
Task<DnsDatagram> DirectQueryAsync(DnsQuestionRecord question, int timeout = 4000); Task<DnsDatagram> DirectQueryAsync(DnsQuestionRecord question, int timeout = 4000);
/// <summary>
/// Allows querying the DNS server core directly. This call supports recursion even if its not enabled in the DNS server configuration. The request wont be routed to any of the installed DNS Apps except for processing APP records. The request and its response are not counted in any stats or logged.
/// </summary>
/// <param name="request">The DNS request to query.</param>
/// <param name="timeout">The timeout value in milliseconds to wait for response.</param>
/// <returns>The DNS response for the DNS query.</returns>
/// <exception cref="TimeoutException">When request times out.</exception>
Task<DnsDatagram> DirectQueryAsync(DnsDatagram request, int timeout = 4000);
/// <summary> /// <summary>
/// Writes a log entry to the DNS server log file. /// Writes a log entry to the DNS server log file.
/// </summary> /// </summary>