---
title: "localEndpoint(_:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/nwparametersprovider/localendpoint(_:)"
---

# localEndpoint(_:)

Specify a specific endpoint to use as the local endpoint.

## Declaration

```swift
func localEndpoint(_ endpoint: NWEndpoint?) -> Self
```

## Parameters

- `endpoint`: The local endpoint to require, or nil if none.

## Discussion

Discussion For connections, this will be used to initiate traffic; for listeners, this will be used for receiving incoming connections.
