register function
Registers a service.
The requested name may be updated by the native side if there are name conflicts in the local network: "Service Name" -> "Service Name (2)" -> "Service Name (3)" etc, depending on availability.
Registering might take a long time (observed on macOS / iOS) if the number of these retries is high. In this case, consider first discovering services, then pre-choosing an available name.
Implementation
Future<Registration> register(Service service) async =>
NsdPlatformInterface.instance.register(service);