Instance Property

port

The port on which the service is listening for connections.

Declaration

var port: Int { get }

Discussion

If the object was initialized by calling init(domain:type:name:port:) (whether by your code or by a browser object), then the value was set when the object was first initialized.

If the object was initialized by calling init(domain:type:name:), the value of this property is not valid (-1) until after the service has successfully been resolved (when addresses is non-nil).

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
func resolve(withTimeout: TimeInterval)

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

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.