Open soundprojects opened 2 years ago
When trying to run the same code on two different clients, they both fight over the same name Shouldn't hap-rs rename the service to 'service (1)' and so on?
You mean running the program with the exact same parameters on different network clients at the same time? Good question, I don't know what the expected name collision behavior for mDNS clients is there. Do you? And is this a use case?
And should this also mean that the c# number should be incremented when adding the second service? Now they have the same id's?
Interesting. The HAP specification says
Must update when an accessory, service, or characteristic is added or removed on the accessory server.
about it. We're updating the number on accessory additions and removals. Since we don't have methods for dynamic addition and removal of services to accessories or characteristics to services, I'd say as of right now it's up to the crate user to bump the number whenever they change services or characteristics.
I read into this with the (great) Oreilly book on zeroconf networking and the renaming behavior 'service (1)' should happen but when running two clients with the exact same configuration this doesn't happen. The second service simply replaces the DNS records. I think this is incorrect behavior.
I ran into this also because in the examples of your crate, you pass an example Mac Adress as the ID. This causes identical ID's to be generated when running the same code in different clients in the network. (My dev mac and the raspberry production device)
When trying to run the same code on two different clients, they both fight over the same name Shouldn't hap-rs rename the service to 'service (1)' and so on?
And should this also mean that the c# number should be incremented when adding the second service? Now they have the same id's?