A description used to advertise the Bonjour service that a listener provides.
SDKs
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
- watchOS 6.0+
- Xcode 10.0+
Framework
- Network
Declaration
struct NWListener.Service
A description used to advertise the Bonjour service that a listener provides.
SDKs
Framework
struct NWListener.Service
init(name: String?, type: String, domain: String?, txt Record: Data?)
Initializes a Bonjour service to advertise.
init(name: String?, type: String, domain: String?, txt Record: NWTXTRecord)
Initializes a Bonjour service to advertise with a TXT record.
var no Auto Rename: Bool
A Boolean that indicates whether the service prohibits automatic renaming in the event of a name conflict.
let name: String?
The Bonjour name of the service.
let type: String
The Bonjour type of the service.
let domain: String?
The Bonjour domain of the service.
var txt Record Object: NWTXTRecord?
The TXT record to advertise with the service.
let txt Record: Data?
The TXT record as a raw buffer to advertise with the service.
var debug Description: String
The description of the service.
static func != (NWListener .Service, NWListener .Service) -> Bool
Returns a Boolean value indicating whether two values are not equal.
var service: NWListener .Service?
A Bonjour service that advertises the listener on the local network.
var service Registration Update Handler: ((NWListener .Service Registration Change) -> Void)?
A handler that receives updates for the service endpoint being advertised.
enum NWListener .Service Registration Change
Changes to how a network listener's service is advertised.