Files
zeekay 2216459620 fix(mdns): mDNS-only, canonical service-type _hanzo._tcp.local. (HIP-0069)
Per HIP-0069 — one service type, no transition window, no backwards
compat. Non-compliant deployments fail loudly so we detect and fix
them rather than papering over them.

Removed:
- LEGACY_SERVICE_TYPE (`_hanzo-zap._tcp.local.`)
- Dual-publish (canonical + legacy) on `publish()`
- Dual-browse on `browse()`
- All de-dup logic that existed only because of the dual records

The only Hanzo service-type is `_hanzo._tcp.local.`. Verified live with
macOS dns-sd: the omniserver advertises only on canonical, and is
reachable via canonical browse from sibling python and the extension's
native-messaging helper.
2026-05-15 12:18:03 -07:00

15 lines
462 B
Rust

//! Example: browse every Hanzo service on the LAN. Run with
//! `cargo run --example browse_all`.
use zap_mdns::{browse};
use std::time::Duration;
fn main() -> Result<(), zap_mdns::Error> {
let services = browse(None, Duration::from_secs(2))?;
println!("found {} services:", services.len());
for s in services {
println!(" {:8} {:32} {:32} caps={:?}",
s.role.as_str(), s.server_id, s.url(), s.capabilities);
}
Ok(())
}