<!--
{
  "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/hostPort(host:port:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network10NWEndpointO8hostPortyA2C4HostO_AC0D0VtcACmF"
  },
  "title" : "NWEndpoint.hostPort(host:port:)"
}
-->

# NWEndpoint.hostPort(host:port:)

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

```
case hostPort(host: NWEndpoint.Host, port: NWEndpoint.Port)
```

---

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)