Struct mdns_sd::ServiceDaemon[][src]

pub struct ServiceDaemon { /* fields omitted */ }
Expand description

A daemon thread for mDNS

This struct provides a handle and an API to the daemon. It is cloneable.

Implementations

Creates a new daemon.

The daemon (re)uses the default mDNS port 5353. To keep it simple, we don’t ask callers to set the port.

Starts browsing for a specific service type.

Returns a channel Receiver to receive events about the service. The caller can call .try_recv() on this receiver to handle events in an async environment or call .recv() in a sync environment.

When a new instance is found, the daemon automatically tries to resolve, i.e. finding more details, i.e. SRV records and TXT records.

Stops searching for a specific service type.

When an error is returned, the caller should retry only when the error is Error::Again, otherwise should log and move on.

Registers a service provided by this host.

Unregisters a service. This is a graceful shutdown of a service.

Returns a channel receiver that is used to receive the status code of the unregister.

When an error is returned, the caller should retry only when the error is Error::Again, otherwise should log and move on.

Shuts down the daemon thread.

When an error is returned, the caller should retry only when the error is Error::Again, otherwise should log and move on.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.