Class NameServer
Anwsers questions from the local Catalog.
Implements
Inherited Members
Namespace: Makaretu.Dns.Resolving
Assembly: Makaretu.Dns.dll
Syntax
public class NameServer : IResolver
Properties
| Improve this Doc View SourceAnswerAllQuestions
Determines how multiple questions are answered.
Declaration
public bool AnswerAllQuestions { get; set; }
Property Value
Type | Description |
---|---|
Boolean | false to answer any of the questions. false to answer all of the questions. The default is false. |
Remarks
Standard DNS specifies that only one of the questions need to be answered. Multicast DNS specifies that all the questions need to be answered.
Catalog
Information about some portion of the DNS database.
Declaration
public Catalog Catalog { get; set; }
Property Value
Type | Description |
---|---|
Catalog | A subset of the DNS database. Typically (1) one or more zones or (2) a cache of received responses. |
Methods
| Improve this Doc View SourceFindAnswerAsync(Question, Message, CancellationToken)
Find an answer to the Question.
Declaration
protected Task<bool> FindAnswerAsync(Question question, Message response, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Question | question | The question to answer. |
Message | response | Where the answers are added. |
CancellationToken | cancel | Is used to stop the task. When cancelled, the TaskCanceledException is raised. |
Returns
Type | Description |
---|---|
Task<Boolean> | A task that represents the asynchronous operation. The task's value is true if the resolver added an answer. |
Remarks
Derived classes must implement this method.
ResolveAsync(Message, CancellationToken)
Get an answer to a question.
Declaration
public Task<Message> ResolveAsync(Message request, CancellationToken cancel = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
Message | request | |
CancellationToken | cancel | Is used to stop the task. When cancelled, the TaskCanceledException is raised. |
Returns
Type | Description |
---|---|
Task<Message> | A task that represents the asynchronous operation. The task's value is
the Message response to the |
ResolveAsync(Question, Message, CancellationToken)
Get an answer to a question.
Declaration
public Task<Message> ResolveAsync(Question question, Message response = null, CancellationToken cancel = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
Question | question | The question to answer. |
Message | response | Where the answers are added. If null, then a new Message is created. |
CancellationToken | cancel | Is used to stop the task. When cancelled, the TaskCanceledException is raised. |
Returns
Type | Description |
---|---|
Task<Message> | A task that represents the asynchronous operation. The task's value is
a Message response to the |
Remarks
If the question's domain does not exist, then the closest authority (SOARecord) is added to the AuthorityRecords.