<!--
{
  "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_connection_state_t",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "c:@EA@nw_connection_state_t"
  },
  "title" : "nw_connection_state_t"
}
-->

# nw_connection_state_t

States indicating whether a connection can be used to send and receive data.

```
struct nw_connection_state_t
```

## Topics

### Connection States

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

The connection is not valid.

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

The connection is waiting for a network path change.

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

The connection in the process of being established.

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

The connection is established, and ready to send and receive data.

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

The connection has disconnected or encountered an error.

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

The connection has been canceled.

## Relationships

### Conforms To

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

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)