Expand description
mDNS/DNS-SD discovery for rtl_tcp-compatible servers.
Provides:
Advertiser— for anrtl_tcpserver to announce itself on the local network (e.g. thesdr-server-rtltcpcrate uses this)Browser— for anrtl_tcpclient to find servers without the user manually typinghost:port
Service type: _rtl_tcp._tcp.local. This is not an IANA-registered
type — the SDR ecosystem uses it by convention (ShinySDR,
rtl_tcp_client, etc.). Picking the same string means interop with
those tools where they implement discovery.
§Pure-Rust stack
Uses mdns-sd — no Avahi / Bonjour system dependency, no async
runtime. The daemon runs on its own thread internally; the
Browser spawns a second thread that translates mdns-sd’s
event channel into the domain events in this crate.
Structs§
- Advertise
Options - Options for
Advertiser::announce. All values exceptporthave reasonable defaults derivable from the local environment, but the caller usually has richer metadata (tuner, gain count) already at hand from the server that’s being advertised. - Advertiser
- Active advertisement. Drops → unregisters.
- Browser
- Live browser. Drops → stops listening and shuts the daemon down.
- Discovered
Server - A server visible on the local network.
- TxtRecord
- TXT record payload attached to a server advertisement. Each field
serializes to
key=valuein the mDNS TXT record; missing fields are omitted entirely so older clients don’t see empty-string junk.
Enums§
- Discovery
Error - Errors from advertiser / browser setup and runtime.
- Discovery
Event - Events the browser emits to its callback.
Constants§
- SERVICE_
TYPE - Fully-qualified mDNS service type used by every rtl_tcp advertisement. This string is load-bearing for interop — any other tool that wants to browse us (or that we want to browse) must use the same literal.
Functions§
- local_
hostname - Best-effort local hostname lookup, returning the bare hostname
without any
.local.suffix. Useful as a default nickname for advertisement (callers who want the full mDNS form can append.local.themselves).