react-native-zeroconf
react-native-zeroconf copied to clipboard
publishService documentation
Thanks for adding the publishService method - great stuff.
I think there is an error in the documentation:
publishService(type, protocol, domain, name, port) Publish a service
This adds a service for the current device to the discoverable services on the network.
domain should be the domain the service is sitting on, dot suffixed, for example 'local.' type should be both type and protocol, underscore prefixed, for example '_http._tcp' name should be unique to the device, often the device name port should be an integer
That doesn't work - as you are formatting the string in Objective-C like so
type:[NSString stringWithFormat:@"_%@._%@.", type, protocol]
I think it should simply be type and protocol, no prefixes or anything, like so:
zeroconf.publishService(
"osc",
"udp",
"local.",
"test,
7049
);
Cheers