Repository navigation
Description
Request
Please expose a daemon-owned, typed, point-in-time local readiness snapshot for browsing, separate from DaemonStatus::Running and ServiceEvent::SearchStarted(String). Related: #514 discusses publication readiness and setup bookkeeping; this request is specifically the browsing consumer contract.
Observed source behavior in 0.21.4
exec_command_browse sends SearchStarted before issuing queries, including when my_intfs is empty. Socket creation and multicast join failures can be debug-only. Constructor join failures can still leave addresses in my_intfs; an occupied add_interface entry can also retain an address after a failed join. Thus neither SearchStarted, daemon liveness, nor a positive interface count establishes local socket/membership prerequisites. This is a static source finding, not a claim about a newly reproduced network failure.
Proposed contract
A bounded command/reply operation, ordered on the daemon thread, should return typed per-address/interface outcomes based on actual owned sockets, successful poller setup, current interface selection, retained addresses, and successful multicast membership bookkeeping. Distinguish no selected usable interfaces, missing family sockets, absent membership, and locally initialized interfaces. A monitor alone is insufficient because initialization can precede subscription and bounded monitor queues can lose events. A snapshot should be available even without subscribers.
Successful membership must be tracked per interface/family so an already-held membership on a multi-address interface is not mistaken for failure. Interface disable/removal and last-address leave must invalidate that bookkeeping. Socket TTL/hop setup errors must not be silently treated as success. Reply delivery must not block the daemon if a caller abandons the request.
The result must explicitly mean local prerequisites at a point in time, not packet delivery, completed service resolution, remote reachability, continued multicast health, trusted device identity, or audio interoperability. A quiet LAN with no devices must not be declared failed merely for having no advertisements. Human-readable SearchStarted strings should not need parsing.
Local implementation plan
We are carrying a local patch of the pinned MIT/Apache-2.0 package for this API, with non-networking tests using injected socket/membership state. No upstream implementation acceptance or working network discovery is implied. Happy to align the API with an upstream design rather than retain the carry patch.
Activity
keepsimple1 commentedon Nov 9, 2026
Sorry about my delayed reply. Overall this request makes sense. I have an idea to refactor a pending PR #524 to also support this. Will update the PR and get back to you.
keepsimple1 commentedon Nov 11, 2026
I've updated the PR #524 to include more info about the socket bind status and multicast membership of each interface. Could you take a look at it and try out the PR branch? And let me know if that works for your needs?
Specifically, does
RunningState(inside the value returned by ServiceDaemonstatus()call) and its methods offer enough info for you?keepsimple1 commentedon Nov 12, 2026
Here is how the requirements in this issue map to PR #524 :
SearchStartedand livenessstatus()→DaemonStatus::Running(RunningState), built when requestedGetStatusis handled in order with other commands. Astatus()afterenable_interface()reflects the new selection, and one right afternew()reflects the joins done at startup.bounded(1), so the send can't block, and a dropped receiver is only logged.ipv4_socket()/ipv6_socket()→is_bound(),bind_error()new()returns an error if registering the sockets with the poller failsselected_intfs()is empty, or nothing in it is joinedMembership::is_joined()/join_error()Nonefor it, not a failure.status()andRunningState, and nothing in the snapshot depends on trafficSearchStartedstringsSearchStarteditself is unchanged.For the last item "TTL/hop errors no treated as success", could you share more details about why you'd like to have it and what're the use cases? so that we can look into it again in a separate PR / issue. Thanks!
feat: report detailed state in DaemonStatus::Running (#524)
keepsimple1 commentedon Nov 14, 2026
I've merged PR #524 . Could you please give the latest
maina try and see if it works for you? Any comments are appreciated!