[GH-ISSUE #2571] Separate traits for querying for a stream of responses vs. a single response #1017

Open
opened 2026-03-16 01:17:38 +03:00 by kerem · 2 comments
Owner

Originally created by @divergentdave on GitHub (Nov 12, 2024).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2571

The following TODO suggests changing DnsHandle to return one response instead of a stream of responses.

github.com/hickory-dns/hickory-dns@64953998f8/crates/recursor/src/recursor_dns_handle.rs (L384-L385)

A stream of responses is needed for mDNS and DNS-SD use cases, but using the same trait for RecursorDnsHandle and DnssecDnsHandle, which produce exactly one response, adds complexity to their implementation and use.

See also #383 and #1478.

Originally created by @divergentdave on GitHub (Nov 12, 2024). Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/2571 The following TODO suggests changing `DnsHandle` to return one response instead of a stream of responses. https://github.com/hickory-dns/hickory-dns/blob/64953998f8350d3cc8ebf125316e9e734182a7c5/crates/recursor/src/recursor_dns_handle.rs#L384-L385 A stream of responses is needed for mDNS and DNS-SD use cases, but using the same trait for `RecursorDnsHandle` and `DnssecDnsHandle`, which produce exactly one response, adds complexity to their implementation and use. See also #383 and #1478.
Author
Owner

@djc commented on GitHub (Nov 12, 2024):

Aren't there also other cases in normal resolving where we want to yield multiple results for a single query (like with EDNS or just over TCP)?

<!-- gh-comment-id:2471352382 --> @djc commented on GitHub (Nov 12, 2024): Aren't there also other cases in normal resolving where we want to yield multiple results for a single query (like with EDNS or just over TCP)?
Author
Owner

@bluejekyll commented on GitHub (Mar 2, 2025):

Yeah, this is a generic issue, I'm not sure what we should really do here. We also need a stream for AXFR I believe. I'm definitely open to ideas here.

<!-- gh-comment-id:2692896717 --> @bluejekyll commented on GitHub (Mar 2, 2025): Yeah, this is a generic issue, I'm not sure what we should really do here. We also need a stream for AXFR I believe. I'm definitely open to ideas here.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#1017
No description provided.