---
title: port
framework: networkextension
role: symbol
role_heading: Instance Property
path: networkextension/nwhostendpoint/port
---

# port

The endpoint’s port, represented as a string.

## Declaration

```swift
var port: String { get }
```

## Discussion

Discussion Since the port is represented as a string, it is always represented in host byte order. If converting between byte fields and strings, make sure to use host byte ordering.

## See Also

### Getting endpoint properties

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