[PR #1225] [MERGED] Dns response future #2104

Closed
opened 2026-03-16 05:49:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/1225
Author: @djc
Created: 9/30/2020
Status: Merged
Merged: 10/1/2020
Merged by: @bluejekyll

Base: mainHead: dns-response-future


📝 Commits (6)

  • e288c8b introduce simple DnsResponseFuture enum
  • 3dd9aae remove response future type parameter where possible
  • df14503 flatten unnecessary enums
  • daf2e5f remove remnants of UdpResponse type
  • 926c257 remove remnants of DnsMultiplexerSerialResponse type
  • 4ce86b2 remove now unnecessary method error_response() from DnsRequestSender

📊 Changes

26 files changed (+328 additions, -657 deletions)

View changed files

📝 bin/benches/comparison_benches.rs (+2 -3)
📝 bin/tests/named_test_rsa_dnssec.rs (+2 -5)
📝 bin/tests/server_harness/mod.rs (+9 -17)
📝 crates/client/src/client/async_client.rs (+19 -41)
📝 crates/client/src/client/async_secure_client.rs (+22 -39)
📝 crates/client/src/client/client.rs (+3 -3)
📝 crates/client/src/client/client_connection.rs (+2 -7)
📝 crates/client/src/https_client_connection.rs (+0 -2)
📝 crates/client/src/multicast/mdns_client_connection.rs (+1 -2)
📝 crates/client/src/tcp/tcp_client_connection.rs (+1 -2)
📝 crates/client/src/udp/udp_client_connection.rs (+0 -2)
📝 crates/https/src/https_client_stream.rs (+10 -12)
📝 crates/proto/src/udp/mod.rs (+1 -1)
📝 crates/proto/src/udp/udp_client_stream.rs (+66 -136)
📝 crates/proto/src/xfer/dns_exchange.rs (+52 -80)
📝 crates/proto/src/xfer/dns_multiplexer.rs (+9 -71)
📝 crates/proto/src/xfer/dns_response.rs (+70 -0)
📝 crates/proto/src/xfer/mod.rs (+33 -94)
📝 crates/resolver/src/https.rs (+2 -4)
📝 crates/resolver/src/name_server/connection_provider.rs (+12 -108)

...and 6 more files

📄 Description

This PR introduces a simple concrete enum DnsResponseFuture to replace the widespread abstraction over just a few implementations of that type. I've made this into separate commits so it's hopefully a bit easier to review, but this seems like a nice way to make the code less abstract and easier to follow (and feel free to squash the changes if you prefer, of course).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/1225 **Author:** [@djc](https://github.com/djc) **Created:** 9/30/2020 **Status:** ✅ Merged **Merged:** 10/1/2020 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `main` ← **Head:** `dns-response-future` --- ### 📝 Commits (6) - [`e288c8b`](https://github.com/hickory-dns/hickory-dns/commit/e288c8b386e3aa61baac78595226f297aa82cc44) introduce simple DnsResponseFuture enum - [`3dd9aae`](https://github.com/hickory-dns/hickory-dns/commit/3dd9aae9b739fa1dc9554093901785d789e96816) remove response future type parameter where possible - [`df14503`](https://github.com/hickory-dns/hickory-dns/commit/df14503104f14e01b0e6ae16a517aab86e137d64) flatten unnecessary enums - [`daf2e5f`](https://github.com/hickory-dns/hickory-dns/commit/daf2e5f7208a10285924db85dd623d874a7c1033) remove remnants of UdpResponse type - [`926c257`](https://github.com/hickory-dns/hickory-dns/commit/926c25706b97b590806273d42ec5a0a0698bb94d) remove remnants of DnsMultiplexerSerialResponse type - [`4ce86b2`](https://github.com/hickory-dns/hickory-dns/commit/4ce86b2280fb31c2382d750b8fa650f25ea65a30) remove now unnecessary method error_response() from DnsRequestSender ### 📊 Changes **26 files changed** (+328 additions, -657 deletions) <details> <summary>View changed files</summary> 📝 `bin/benches/comparison_benches.rs` (+2 -3) 📝 `bin/tests/named_test_rsa_dnssec.rs` (+2 -5) 📝 `bin/tests/server_harness/mod.rs` (+9 -17) 📝 `crates/client/src/client/async_client.rs` (+19 -41) 📝 `crates/client/src/client/async_secure_client.rs` (+22 -39) 📝 `crates/client/src/client/client.rs` (+3 -3) 📝 `crates/client/src/client/client_connection.rs` (+2 -7) 📝 `crates/client/src/https_client_connection.rs` (+0 -2) 📝 `crates/client/src/multicast/mdns_client_connection.rs` (+1 -2) 📝 `crates/client/src/tcp/tcp_client_connection.rs` (+1 -2) 📝 `crates/client/src/udp/udp_client_connection.rs` (+0 -2) 📝 `crates/https/src/https_client_stream.rs` (+10 -12) 📝 `crates/proto/src/udp/mod.rs` (+1 -1) 📝 `crates/proto/src/udp/udp_client_stream.rs` (+66 -136) 📝 `crates/proto/src/xfer/dns_exchange.rs` (+52 -80) 📝 `crates/proto/src/xfer/dns_multiplexer.rs` (+9 -71) 📝 `crates/proto/src/xfer/dns_response.rs` (+70 -0) 📝 `crates/proto/src/xfer/mod.rs` (+33 -94) 📝 `crates/resolver/src/https.rs` (+2 -4) 📝 `crates/resolver/src/name_server/connection_provider.rs` (+12 -108) _...and 6 more files_ </details> ### 📄 Description This PR introduces a simple concrete `enum DnsResponseFuture` to replace the widespread abstraction over just a few implementations of that type. I've made this into separate commits so it's hopefully a bit easier to review, but this seems like a nice way to make the code less abstract and easier to follow (and feel free to squash the changes if you prefer, of course). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 05:49:00 +03:00
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#2104
No description provided.