Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 android 上,我想通过使用服务名称来查找记录列表。我尝试过 dnsjava 和 jmdns 之类的 api,但都返回了空结果。我遇到过这个类似的问题,但也没有人回答:
在 Android 上解析 DNS SRV 记录的轻量级方法
You can use dnsjava library and use its Lookup class for that purpose. Like:
String recordName = _name._tcp.domainName.;
Lookup lookup = new Lookup(recordName, Type.SRV);
Records recs[] = lookup.run();