The interface a net service uses to inform its delegate about the state of the service it offers.


protocol NetServiceDelegate


The NetServiceDelegate protocol defines the optional methods implemented by delegates of NetService objects.


Using Network Services

func netServiceWillPublish(NetService)

Notifies the delegate that the network is ready to publish the service.

func netService(NetService, didNotPublish: [String : NSNumber])

Notifies the delegate that a service could not be published.

func netServiceDidPublish(NetService)

Notifies the delegate that a service was successfully published.

func netServiceWillResolve(NetService)

Notifies the delegate that the network is ready to resolve the service.

func netService(NetService, didNotResolve: [String : NSNumber])

Informs the delegate that an error occurred during resolution of a given service.

func netServiceDidResolveAddress(NetService)

Informs the delegate that the address for a given service was resolved.

func netService(NetService, didUpdateTXTRecord: Data)

Notifies the delegate that the TXT record for a given service has been updated.

func netServiceDidStop(NetService)

Informs the delegate that a publish() or resolve(withTimeout:) request was stopped.

Accepting Connections

func netService(NetService, didAcceptConnectionWith: InputStream, outputStream: OutputStream)

Called when a client connects to a service managed by Bonjour.


Inherits From

See Also

Local Network Services

class NetService

A network service that broadcasts its availability using multicast DNS.