<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/nw_protocol_stack_t",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "c:@T@nw_protocol_stack_t"
  },
  "title" : "nw_protocol_stack_t"
}
-->

# nw_protocol_stack_t

An ordered set of protocol options that define the protocols that connections and listeners use.

```
typealias nw_protocol_stack_t = any OS_nw_protocol_stack
```

## Topics

### Modifying Application Protocols

[`nw_protocol_stack_prepend_application_protocol(_:_:)`](/documentation/Network/nw_protocol_stack_prepend_application_protocol(_:_:))

Adds a protocol onto the top of the protocol stack.

[`nw_protocol_stack_clear_application_protocols(_:)`](/documentation/Network/nw_protocol_stack_clear_application_protocols(_:))

Removes all application protocols from the protocol stack.

[`nw_protocol_stack_iterate_application_protocols(_:_:)`](/documentation/Network/nw_protocol_stack_iterate_application_protocols(_:_:))

Iterates through the array of application protocol options that will be used by connections and listeners.

[`nw_protocol_stack_iterate_protocols_block_t`](/documentation/Network/nw_protocol_stack_iterate_protocols_block_t)

A block that allows you to inspect or modify a single protocol’s options.

### Configuring Lower Protocols

[`nw_protocol_stack_copy_transport_protocol(_:)`](/documentation/Network/nw_protocol_stack_copy_transport_protocol(_:))

Accesses the options for the protocol stack’s transport protocol.

[`nw_protocol_stack_set_transport_protocol(_:_:)`](/documentation/Network/nw_protocol_stack_set_transport_protocol(_:_:))

Replaces the protocol stack’s transport protocol with a new set of options.

[`nw_protocol_stack_copy_internet_protocol(_:)`](/documentation/Network/nw_protocol_stack_copy_internet_protocol(_:))

Accesses the protocol stack’s Internet Protocol options.



---

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)