Contents

addresses

A read-only array containing NSData objects, each of which contains a socket address for the service.

Declaration

var addresses: [Data]? { get }

Discussion

An array containing NSData objects, each of which contains a socket address for the service. Each NSData object in the returned array contains an appropriate sockaddr structure that you can use to connect to the socket. The exact type of this structure depends on the service to which you are connecting. If no addresses were resolved for the service, the returned array contains zero elements.

It is possible for a single service to resolve to more than one address or not resolve to any addresses. A service might resolve to multiple addresses if the computer publishing the service is currently multihoming.

See Also

Related Documentation

Configuring Network Services