Closed naggie closed 6 years ago
I was thinking about this last night, actually. I was thinking we could create an alternative non-channel based version of Discoverer
. Possibly renaming the current one to ChanneledDiscoverer
.
I think we should agree on a single implementation, maybe similar to the python one. What makes sense in real use matters most though, I have not tried it yet but I think the original design at least suits dspa, signage etc
I think it's best that we stick to a single implementation too. Similar to the Python one is fine and should be easy/logical to use.
If you don't mind, I'll modify my fork to implement a GetServices
method which returns a list of recently discovered services, removing old ones after some timeout.
Do you have a specific timeout in mind? Or let the user decide?
I have implemented this now and submitted the PR. Let me know what you think.
The timeout is double the heartbeat interval according to the protocol (assuming I wrote it down haha).
(edit: I see you've done that. Great!)
You beat me to it. Thanks!
Oh yeah, I did find that in the end and forgot to mention it haha.
In addition to or as an alternative to the discoveries channel
The implementation should return services which are currently "alive" like th python implementation