Add support to client transports for requests that may result in multiple

responses. (#377)

This adds ComposeRequestMulti and other *Multi types. The main change is to
the stream transport, which is the only transport that implements
SendRequestMulti.
This commit is contained in:
Philip Homburg
2024-09-04 14:03:12 +02:00
parent 851d261d31
commit 90cc96d632
14 changed files with 1044 additions and 99 deletions
+8
View File
@@ -439,6 +439,14 @@ impl<Octs: Octets + ?Sized> Message<Octs> {
}
}
/// Returns whether the message has a question that is either AXFR or
/// IXFR.
pub fn is_xfr(&self) -> bool {
self.first_question()
.map(|q| matches!(q.qtype(), Rtype::AXFR | Rtype::IXFR))
.unwrap_or_default()
}
/// Returns the first question, if there is any.
///
/// The method will return `None` both if there are no questions or if