---
title: NWEndpoint.Port
framework: network
role: symbol
role_heading: Structure
path: network/nwendpoint/port
---

# NWEndpoint.Port

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

## Declaration

```swift
struct Port
```

## Topics

### Creating Ports

- [init(_:)](network/nwendpoint/port/init(_:).md)

### Setting Well-Known Ports

- [any](network/nwendpoint/port/any.md)
- [ssh](network/nwendpoint/port/ssh.md)
- [smtp](network/nwendpoint/port/smtp.md)
- [http](network/nwendpoint/port/http.md)
- [pop](network/nwendpoint/port/pop.md)
- [imap](network/nwendpoint/port/imap.md)
- [https](network/nwendpoint/port/https.md)
- [imaps](network/nwendpoint/port/imaps.md)
- [socks](network/nwendpoint/port/socks.md)

## Relationships

### Conforms To

- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByIntegerLiteral](swift/expressiblebyintegerliteral.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Host and Ports

- [NWEndpoint.Host](network/nwendpoint/host.md)
