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

# localOnly(_:)

Limit inbound connections to peers attached to the local link.

## Declaration

```swift
func localOnly(_ local: Bool) -> Self
```

## Parameters

- `local`: True if limited to local peers, false otherwise.

## Discussion

Discussion Listeners will only advertise services on the local link and will only accept connections from the local link.
