Contents

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