Instance Method

resolve(withTimeout:)

Starts a resolve process of a finite duration for the service.

Declaration

func resolve(withTimeout timeout: TimeInterval)

Parameters

timeout

The maximum number of seconds to attempt a resolve. A value of 0.0 indicates no timeout and a resolve process of indefinite duration.

Discussion

During the resolve period, the service sends netServiceDidResolveAddress(_:) to the delegate for each address it discovers that matches the service parameters. Once the timeout is hit, the service sends netServiceDidStop(_:) to the delegate. If no addresses resolve during the timeout period, the service sends netService(_:didNotResolve:) to the delegate.

See Also

Using Network Services

func publish()

Attempts to advertise the receiver’s on the network.

func publish(options: NetService.Options)

Attempts to advertise the receiver on the network, with the given options.

func resolve()

Starts a resolve process for the service.

Deprecated
var port: Int

The port on which the service is listening for connections.

func startMonitoring()

Starts the monitoring of TXT-record updates for the receiver.

func stop()

Halts a currently running attempt to publish or resolve a service.

func stopMonitoring()

Stops the monitoring of TXT-record updates for the receiver.