mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[PR #1560] [CLOSED] Change transport traits to use instance methods. #2419
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#2419
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/1560
Author: @pinkisemils
Created: 10/5/2021
Status: ❌ Closed
Base:
main← Head:change-transport-traits📝 Commits (6)
c3dc0d9Implement Tokio traits for AsyncIoTokioAsAstd4d6802eAdd UdpSocketBinderecb9c95Add TcpConnector trait0f936dcCombine TcpConnector and UdpBinder9a03a75Stop using async_traite83c074Inline trait methods📊 Changes
60 files changed (+803 additions, -677 deletions)
View changed files
📝
Cargo.lock(+1 -0)📝
bin/benches/comparison_benches.rs(+7 -9)📝
bin/tests/named_https_tests.rs(+4 -5)📝
bin/tests/named_rustls_tests.rs(+5 -8)📝
bin/tests/named_test_rsa_dnssec.rs(+2 -2)📝
bin/tests/named_tests.rs(+15 -17)📝
crates/async-std-resolver/src/lib.rs(+3 -3)📝
crates/async-std-resolver/src/net.rs(+3 -18)📝
crates/async-std-resolver/src/runtime.rs(+33 -19)📝
crates/async-std-resolver/src/tests.rs(+20 -40)📝
crates/client/src/client/client.rs(+6 -4)📝
crates/client/src/https_client_connection.rs(+11 -9)📝
crates/client/src/lib.rs(+8 -6)📝
crates/client/src/tcp/tcp_client_connection.rs(+24 -17)📝
crates/client/src/udp/udp_client_connection.rs(+22 -11)📝
crates/proto/src/error.rs(+1 -0)📝
crates/proto/src/https/https_client_stream.rs(+38 -32)📝
crates/proto/src/lib.rs(+31 -0)📝
crates/proto/src/native_tls/tests.rs(+2 -2)📝
crates/proto/src/native_tls/tls_client_stream.rs(+11 -10)...and 40 more files
📄 Description
I've changed the transport traits to use instance methods when creating the underlying sockets. This is useful to not rely on static variables if creating sockets relies on configuration that can change at runtime. The changes themselves are somewhat banal, with most of it being changes to the testing code, whereas the server implementation code itself has had no changes at all. There are also some changes that just some imports for testing.
For now, the
RuntimeProvider::Handletype is expected to implementTcpConnectorandUdpSocketBindertraits, but this gets a bit messy. I'm unsure if theHandleshould have a trait of it's own that then depends onTcpConnector,SpawnandUdpSocketBinder, or just have 3 separate handle structs.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.