<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/nw_quic_set_max_udp_payload_size(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "c:@F@nw_quic_set_max_udp_payload_size"
  },
  "title" : "nw_quic_set_max_udp_payload_size(_:_:)"
}
-->

# nw_quic_set_max_udp_payload_size(_:_:)

Sets the maximum length of a QUIC packet that can be received on a connection, in bytes.

```
func nw_quic_set_max_udp_payload_size(_ options: nw_protocol_options_t, _ max_udp_payload_size: UInt16)
```

## Parameters

`options`

A QUIC protocol options instance.

`max_udp_payload_size`

The maximum length of a QUIC packet, in bytes.

## Discussion

---

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)