<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 12.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWEndpoint",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network10NWEndpointO"
  },
  "title" : "NWEndpoint"
}
-->

# NWEndpoint

A local or remote endpoint in a network connection.

```
enum NWEndpoint
```

## Topics

### Endpoint Types

[`NWEndpoint.hostPort(host:port:)`](/documentation/Network/NWEndpoint/hostPort(host:port:))

An endpoint represented as a host and port, with the host including both names and addresses.

[`NWEndpoint.service(name:type:domain:interface:)`](/documentation/Network/NWEndpoint/service(name:type:domain:interface:))

An endpoint represented as a Bonjour service.

[`NWEndpoint.url(_:)`](/documentation/Network/NWEndpoint/url(_:))

An endpoint represented as a URL, with host and port values inferred from the URL.

[`NWEndpoint.unix(path:)`](/documentation/Network/NWEndpoint/unix(path:))

An endpoint represented as a UNIX domain path.

### Host and Ports

[`NWEndpoint.Host`](/documentation/Network/NWEndpoint/Host)

A name or address that identifies a network endpoint.

[`NWEndpoint.Port`](/documentation/Network/NWEndpoint/Port)

A port number you use along with a host to identify a network endpoint.

### Internet Addresses

[`IPAddress`](/documentation/Network/IPAddress)

An abstract protocol you use to interact with IP addresses.

[`IPv4Address`](/documentation/Network/IPv4Address)

A structure containing an IPv4 address.

[`IPv6Address`](/documentation/Network/IPv6Address)

A structure containing an IPv6 address.

### Endpoint Properties

[`interface`](/documentation/Network/NWEndpoint/interface)

The optional interface associated with this endpoint, such as the interface on which it was discovered.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)