---
title: NWTCPConnectionState
framework: networkextension
role: symbol
role_heading: Enumeration
path: networkextension/nwtcpconnectionstate
---

# NWTCPConnectionState

Defined connection states. New types may be defined in the future.

## Declaration

```swift
enum NWTCPConnectionState
```

## Topics

### Connection States

- [NWTCPConnectionState.invalid](networkextension/nwtcpconnectionstate/invalid.md)
- [NWTCPConnectionState.connecting](networkextension/nwtcpconnectionstate/connecting.md)
- [NWTCPConnectionState.waiting](networkextension/nwtcpconnectionstate/waiting.md)
- [NWTCPConnectionState.connected](networkextension/nwtcpconnectionstate/connected.md)
- [NWTCPConnectionState.disconnected](networkextension/nwtcpconnectionstate/disconnected.md)
- [NWTCPConnectionState.cancelled](networkextension/nwtcpconnectionstate/cancelled.md)

### Initializers

- [init(rawValue:)](networkextension/nwtcpconnectionstate/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Monitoring the connection status

- [state](networkextension/nwtcpconnection/state.md)
- [isViable](networkextension/nwtcpconnection/isviable.md)
- [error](networkextension/nwtcpconnection/error.md)
