I registered service using NsdManager:
public void RegisterService(string serviceName, int port, Dictionary<string, string> attributes, string serviceType = "_itxpt_http._tcp.")
{
var serviceInfo = new NsdServiceInfo()
{
ServiceName = serviceName,
Port = port,
ServiceType = serviceType
};
if (attributes != null && attributes.Count > 0)
{
foreach (var keyValuePair in attributes)
{
serviceInfo.SetAttribute(keyValuePair.Key, keyValuePair.Value ?? string.Empty);
}
}
NsdManager.RegisterService(serviceInfo, NsdProtocol.DnsSd, new ListenerWrapper(_eventLogger));
}
And I get TXT and SRV recods. Format of SRV record is inventory._itxpt_http._tcp.local 120 CLASS32769 SRV 0 0 8090 Android-2.local
.
How can I change current format? I want to remove DOT after service name (inventory), I want it to look like this: inventory_itxpt_http._tcp.local 120 CLASS32769 SRV 0 0 8090 Android-2.local