<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/nw_endpoint_t",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "c:@T@nw_endpoint_t"
  },
  "title" : "nw_endpoint_t"
}
-->

# nw_endpoint_t

A local or remote endpoint in a network connection.

```
typealias nw_endpoint_t = any OS_nw_endpoint
```

## Topics

### Endpoint Types

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

The type of a network endpoint, such as a host or a service.

[`nw_endpoint_get_type(_:)`](/documentation/Network/nw_endpoint_get_type(_:))

Accesses the type of a endpoint.

### Host Endpoints

[`nw_endpoint_create_host(_:_:)`](/documentation/Network/nw_endpoint_create_host(_:_:))

Creates a network endpoint with a hostname and port, where the hostname may be interpreted as an IP address.

[`nw_endpoint_get_hostname(_:)`](/documentation/Network/nw_endpoint_get_hostname(_:))

Accesses the hostname stored in an endpoint.

[`nw_endpoint_get_port(_:)`](/documentation/Network/nw_endpoint_get_port(_:))

Accesses the port stored in an endpoint, in host-byte order.

[`nw_endpoint_copy_port_string(_:)`](/documentation/Network/nw_endpoint_copy_port_string(_:))

Copies the port of an endpoint as a string.

### Address Endpoints

[`nw_endpoint_create_address(_:)`](/documentation/Network/nw_endpoint_create_address(_:))

Creates a network endpoint with an address structure.

[`nw_endpoint_get_address(_:)`](/documentation/Network/nw_endpoint_get_address(_:))

Accesses the address structure stored in an address endpoint.

[`nw_endpoint_copy_address_string(_:)`](/documentation/Network/nw_endpoint_copy_address_string(_:))

Copies the address of an endpoint as a string.

[`nw_endpoint_copy_port_string(_:)`](/documentation/Network/nw_endpoint_copy_port_string(_:))

Copies the port of an endpoint as a string.

### Bonjour Service Endpoints

[`nw_endpoint_create_bonjour_service(_:_:_:)`](/documentation/Network/nw_endpoint_create_bonjour_service(_:_:_:))

Creates a network endpoint with a Bonjour service name, type, and domain.

[`nw_endpoint_get_bonjour_service_name(_:)`](/documentation/Network/nw_endpoint_get_bonjour_service_name(_:))

Accesses the Bonjour service name stored in an endpoint.

[`nw_endpoint_get_bonjour_service_type(_:)`](/documentation/Network/nw_endpoint_get_bonjour_service_type(_:))

Accesses the Bonjour service type stored in an endpoint.

[`nw_endpoint_get_bonjour_service_domain(_:)`](/documentation/Network/nw_endpoint_get_bonjour_service_domain(_:))

Accesses the Bonjour service domain stored in an endpoint.

### URL Endpoints

[`nw_endpoint_create_url(_:)`](/documentation/Network/nw_endpoint_create_url(_:))

Creates a network endpoint with a URL string.

[`nw_endpoint_get_url(_:)`](/documentation/Network/nw_endpoint_get_url(_:))

Accesses the URL string stored in an endpoint.



---

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)