init
TypeScriptstatic init(name: (string) | null, type: string, domain?: (string) | null, txtRecord?: (NWTXTRecord) | null): BonjourListenerProviderSwift declarationinit(name: String? = nil, type: String, domain: String? = nil, txtRecord: NWTXTRecord? = nil)Create a Bonjour service to advertise. > Note: You can use `.bonjour()` as a convenience initializer. Advertised services should be registered with IANA. - Parameter name: The name to advertise. Defaults to `nil`, which allows the system to provide the name. - Parameter type: The Bonjour service type to advertise. - Parameter domain: The domain to advertise. Defaults to `nil`, which allows Bonjour to register in all default registration domains. - Parameter txtRecord: An optional text record to advertise. If not provided, Bonjour will not register any text record associated with this service. Later, a text record can be advertised by setting `service` on `NetworkListener` with a TXT record.