Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data of additional TXT records not propagated by serviceResolved event #4

Open
petersmar opened this issue Oct 10, 2016 · 1 comment

Comments

@petersmar
Copy link

Created a Service instance incl. the properties parameter and registered it via the DNSSDResponder.

Poco::DNSSD::Service::Properties propsDEV2;
propsDEV2.add("txtvers", "1");
propsDEV2.add("wss-2", "/bacnet0815");
propsDEV2.add("prio-2", "1000");
propsDEV2.add("ttl-2", "300");
propsDEV2.add("rq-2", "3");

Poco::DNSSD::Service serviceDEV2(ni.index(), "1-0815.dev._sub", "", "_bacnet._tcp,dev", "", "", 8080, propsDEV2);
serviceHandleDEV2 = dnssdResponder.registerService(serviceDEV2);

Created a second Record and added it to the registered service.

char *propsDevString2 = "\x9txtvers=1\xewss-6=/bacnet2\xbprio-6=1000\x9ttl-6=500\x6rq-6=3";
Poco::DNSSD::Record rec2("1-0815.dev._sub._bacnet._tcp.local", Poco::DNSSD::Record::RT_TXT, 54, propsDevString2);
Poco::DNSSD::RecordHandle recordHandle2 = dnssdResponder.addRecord(serviceHandleDEV2, rec2);

Using wireshark I can see that both TXT records are propagated if I browse and resolve the service, but when iterating through the properties list (ServiceEventArgs::service.properties()) only the properties of the TXT Record created while creating the Service class instance are listed in properties, but the key-value-pairs of the second TXT Record added to the registered service are not included in the properties list (keys are all distinguishable).

Why is the data of the second TXT record not listed in the properties list?
Is it related to the handling of subkeys as described in issue #2? Could the second record not associated to the first record and the service?

View to wireshark trace the naming of the records look correct.

@petersmar
Copy link
Author

I retested it without using the "dev._sub." in the naming to check if it depends on the handling of the naming with subtypes. Change my code to:

Poco::DNSSD::Service serviceDEV2(ni.index(), "1-0815", "", "_bacnet._tcp,dev", "", "", 8080, propsDEV2);
Poco::DNSSD::Record rec2("1-0815._bacnet._tcp.local", Poco::DNSSD::Record::RT_TXT, 54, propsDevString2);

but the data of the second added TXT record was not included in the properties list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant