---
title: tryNextResolvedEndpoint()
framework: networkextension
role: symbol
role_heading: Instance Method
path: networkextension/nwudpsession/trynextresolvedendpoint()
---

# tryNextResolvedEndpoint()

Mark the current value of resolvedEndpoint as unusable, and try to switch to the next available endpoint.

## Declaration

```swift
func tryNextResolvedEndpoint()
```

## Discussion

Discussion This should be used when the caller has attempted to communicate with the current resolvedEndpoint, and the caller has determined that it is unusable. If there are no other resolved endpoints, the session will move to the failed state.

## See Also

### Selecting remote endpoints

- [resolvedEndpoint](networkextension/nwudpsession/resolvedendpoint.md)
