Struct iroh_dns_server::dns::DnsServer
source · pub struct DnsServer { /* private fields */ }
Expand description
A DNS server that serves pkarr signed packets.
Implementations§
source§impl DnsServer
impl DnsServer
sourcepub async fn spawn(config: DnsConfig, dns_handler: DnsHandler) -> Result<Self>
pub async fn spawn(config: DnsConfig, dns_handler: DnsHandler) -> Result<Self>
Spawn the server.
sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
Get the local address of the UDP/TCP socket.
sourcepub async fn shutdown(self) -> Result<()>
pub async fn shutdown(self) -> Result<()>
Shutdown the server an wait for all tasks to complete.
sourcepub async fn run_until_done(self) -> Result<()>
pub async fn run_until_done(self) -> Result<()>
Wait for all tasks to complete.
Runs forever unless tasks fail.
Auto Trait Implementations§
impl Freeze for DnsServer
impl !RefUnwindSafe for DnsServer
impl Send for DnsServer
impl Sync for DnsServer
impl Unpin for DnsServer
impl !UnwindSafe for DnsServer
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more