<!--
{
  "availability" : [
    "iOS: 9.0.0 - 18.0.0",
    "iPadOS: 9.0.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.11.0 - 15.0.0",
    "tvOS: 17.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NWUDPSessionState",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:@E@NWUDPSessionState"
  },
  "title" : "NWUDPSessionState"
}
-->

# NWUDPSessionState

```
enum NWUDPSessionState
```

## Topics

### Session States

[`NWUDPSessionStateInvalid`](/documentation/NetworkExtension/NWUDPSessionState/invalid)

The session is in an invalid or uninitialized state.

[`NWUDPSessionStateWaiting`](/documentation/NetworkExtension/NWUDPSessionState/waiting)

The session is waiting for better conditions before attempting to make the session ready.

[`NWUDPSessionStatePreparing`](/documentation/NetworkExtension/NWUDPSessionState/preparing)

The remote endpoint is being resolved.

[`NWUDPSessionStateReady`](/documentation/NetworkExtension/NWUDPSessionState/ready)

The session is ready for reading and writing data.

[`NWUDPSessionStateFailed`](/documentation/NetworkExtension/NWUDPSessionState/failed)

None of the currently resolved endpoints can be used at this time, either due to problems with the path or the client rejecting the endpoints.

[`NWUDPSessionStateCancelled`](/documentation/NetworkExtension/NWUDPSessionState/cancelled)

The session has been cancelled by the client calling `cancel`.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)