Skip to content

.browse for all subservice's #145

Description

@oscartbeaumont

I am looking into using sub-services with mdns-sd and am wondering if there is a way to subscribe to events for all subservices of a specific service.

For example, I want to callmdns_daemon.browse('my-service._udp.local.') and receive events for a._sub._my-service._udp.local., b._sub._my-service._udp.local. and etc. When subscribing to the "parent" service currently events are received, however, the sub_domain property on the Service will be None which means I don't know which subservice (a or b) the event came from which is super important for my usecase.

It seems like internally a._sub._my-service._udp.local. becomes an advertisement for a._sub._my-service._udp.local. and one for _my-service._udp.local. which explains this behavior but it still seems a little bit weird.

As a workaround, I am going to call .browse(...) for each subservice and join them together with StreamUnordered, however, this makes managing the whole thing a lot more complicated and error prone. Preferably I would like to have only a single flume::Reciever for all events which would simplify my code a heap.

Thanks for this library, it's been working super well!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions