---
title: tryNextEndpoint()
framework: network
role: symbol
role_heading: Instance Method
path: network/networkconnection/trynextendpoint()
---

# tryNextEndpoint()

Cancel the currently connected endpoint, causing the connection to fall through to the next endpoint if available, or to go to the waiting state if no more endpoints are available.

## Declaration

```swift
final func tryNextEndpoint()
```
