A local or remote endpoint in a network connection.
SDKs
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
- watchOS 5.0+
- Xcode 10.0+
Framework
- Network
Declaration
enum NWEndpoint
A local or remote endpoint in a network connection.
SDKs
Framework
enum NWEndpoint
case host Port(host: NWEndpoint .Host, port: NWEndpoint .Port)
An endpoint represented as a host and port, with the host including both names and addresses.
case service(name: String, type: String, domain: String, interface: NWInterface?)
An endpoint represented as a Bonjour service.
case url(URL)
An endpoint represented as a URL, with host and port values inferred from the URL.
case unix(path: String)
An endpoint represented as a UNIX domain path.
enum NWEndpoint .Host
A name or address that identifies a network endpoint.
struct NWEndpoint .Port
A port number you use along with a host to identify a network endpoint.
protocol IPAddress
An abstract protocol you use to interact with IP addresses.
struct IPv4Address
A structure containing an IPv4 address.
struct IPv6Address
A structure containing an IPv6 address.
var interface: NWInterface?
The optional interface associated with this endpoint, such as the interface on which it was discovered.
var debug Description: String
The description of this endpoint.
static func != (NWEndpoint, NWEndpoint) -> Bool
Returns a Boolean value indicating whether two values are not equal.
class NWParameters
An object that stores the protocols to use for connections, options for sending data, and network path constraints.