[PR #163] [MERGED] Make ServerFuture generic over T: RequestHandler #1277

Closed
opened 2026-03-16 01:57:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/163
Author: @Antti
Created: 7/4/2017
Status: Merged
Merged: 7/4/2017
Merged by: @bluejekyll

Base: masterHead: make-server-future-generic


📝 Commits (2)

  • 6791004 Move RequestHandler trait to the server crate.
  • cb7ed64 Make ServerFuture generic over T: RequestHandler.

📊 Changes

6 files changed (+46 additions, -46 deletions)

View changed files

📝 client/src/op/mod.rs (+0 -2)
📝 server/src/authority/catalog.rs (+17 -16)
📝 server/src/server/mod.rs (+2 -0)
📝 server/src/server/request_handler.rs (+3 -4)
📝 server/src/server/server_future.rs (+20 -22)
📝 server/tests/common/mod.rs (+4 -2)

📄 Description

This allows you to easily implement a DNS server with your own handler.

Also pass in the whole request to the handler function, as sometimes you might be interested in some other details of the request, like the originating IP address.


🔄 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/163 **Author:** [@Antti](https://github.com/Antti) **Created:** 7/4/2017 **Status:** ✅ Merged **Merged:** 7/4/2017 **Merged by:** [@bluejekyll](https://github.com/bluejekyll) **Base:** `master` ← **Head:** `make-server-future-generic` --- ### 📝 Commits (2) - [`6791004`](https://github.com/hickory-dns/hickory-dns/commit/6791004310c9af904259bb5bc8ee3419e5fb0f28) Move RequestHandler trait to the server crate. - [`cb7ed64`](https://github.com/hickory-dns/hickory-dns/commit/cb7ed64bdba1d8942b87bc97a5e055e22a2ca29d) Make ServerFuture generic over T: RequestHandler. ### 📊 Changes **6 files changed** (+46 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `client/src/op/mod.rs` (+0 -2) 📝 `server/src/authority/catalog.rs` (+17 -16) 📝 `server/src/server/mod.rs` (+2 -0) 📝 `server/src/server/request_handler.rs` (+3 -4) 📝 `server/src/server/server_future.rs` (+20 -22) 📝 `server/tests/common/mod.rs` (+4 -2) </details> ### 📄 Description This allows you to easily implement a DNS server with your own handler. Also pass in the whole request to the handler function, as sometimes you might be interested in some other details of the request, like the originating IP address. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 01:57:48 +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#1277
No description provided.