2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 05:07:40 +00:00

Add IP as a txt record for iOS compat

This commit is contained in:
Albert Vaca Cintora 2023-06-20 10:50:55 +02:00
parent 0d658e6fb6
commit 8c9fc6586b

View File

@ -100,6 +100,10 @@ public class MdnsDiscovery {
serviceInfo.setHost(address);
serviceInfo.setPort(port);
// iOS seems to need these as a TXT records
serviceInfo.setAttribute("ip", address.toString());
serviceInfo.setAttribute("port", Integer.toString(port));
// The following fields aren't really used for anything, since we can't include enough info
// for it to be useful (namely: we can't include the device certificate).
// Each field (key + value) needs to be < 255 bytes. All the fields combined need to be < 1300 bytes.