---
title: NWHostEndpoint
framework: networkextension
role: symbol
role_heading: Class
path: networkextension/nwhostendpoint
---

# NWHostEndpoint

A network endpoint specified by DNS name (or IP address) and port.

## Declaration

```swift
class NWHostEndpoint
```

## Topics

### Initializing host endpoints

- [init(hostname:port:)](networkextension/nwhostendpoint/init(hostname:port:).md)

### Getting endpoint properties

- [hostname](networkextension/nwhostendpoint/hostname.md)
- [port](networkextension/nwhostendpoint/port.md)

## Relationships

### Inherits From

- [NWEndpoint](networkextension/nwendpoint.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Endpoints

- [NWBonjourServiceEndpoint](networkextension/nwbonjourserviceendpoint.md)
- [NWEndpoint](networkextension/nwendpoint.md)
