Skip to content

[ESPmDNS] MDNSResponder does not have methods to receive TXT record keys (only values). #5132

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

Closed
filimonic opened this issue Apr 30, 2021 · 0 comments · Fixed by #5135
Closed

Comments

@filimonic
Copy link
Contributor

[ESPmDNS] MDNSResponder does not have methods to receive TXT record keys (only values).

MDNSResponder should have a String MDNSResponder::key(int idx, int txtIdx) identical to String MDNSResponder::txt(int idx, int txtIdx) but for keys

String MDNSResponder::key(int idx, int txtIdx) {
    mdns_result_t * result = _getResult(idx);
    if(!result){
        log_e("Result %d not found", idx);
        return "";
    }
    if (txtIdx >= result->txt_count) return "";
    return result->txt[txtIdx].key;
}
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

Successfully merging a pull request may close this issue.

1 participant