<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWParametersProvider/peerToPeerIncluded(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network20NWParametersProviderP18peerToPeerIncludedyxSbF"
  },
  "title" : "peerToPeerIncluded(_:)"
}
-->

# peerToPeerIncluded(_:)

Include peer-to-peer interfaces when connecting, listening, and browsing.

```
func peerToPeerIncluded(_ included: Bool) -> Self
```

## Parameters

`included`

True if peer-to-peer interfaces should
be included, false otherwise.

## Discussion> Important: Connections, Listeners, and Browsers using peer-to-peer
> interfaces can consume significantly more power and should not be
> kept running for longer than necessary.
> 
> Peer-to-peer link technologies can be power-intensive. If a connection
> or listener with this flag enabled remains idle for an extended period, the
> system may return a `kDNSServiceErr_AWDLTimeout` error,
> transitioning it to a failed state that yields no further results. Any retry
> mechanism should implement exponential backoff or similar rate-limiting
> to avoid prolonged power drain.

This will not take effect if a specific interface is required.
Applicable when advertising a Bonjour service on a listener, or
connecting to a Bonjour service.

---

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)