4 releases (breaking)
| 0.4.0 | Feb 3, 2023 |
|---|---|
| 0.3.0 | Aug 5, 2022 |
| 0.2.0 | Jul 25, 2022 |
| 0.1.0 | Jul 23, 2022 |
#22 in #dns-domain
25 downloads per month
Used in dominion-chat
66KB
1K
SLoC
Dominion
A crate to implement DNS [Server]s and clients.
Server
use dominion::{Server, ServerService, DnsPacket};
use std::net::SocketAddr;
struct Echo;
impl ServerService for Echo {
fn run<'a>(&self, _client: SocketAddr, question: DnsPacket<'a>) -> Option<DnsPacket<'a>> { Some(question) }
}
Server::default()
.bind("127.0.0.1:5353".parse().unwrap())
.unwrap()
.serve(Echo);
Client
Dependencies
~165–570KB
~13K SLoC