---
title: "maxUDPPayloadSize(_:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/quic/maxudppayloadsize(_:)"
---

# maxUDPPayloadSize(_:)

Set the maximum length of a QUIC packet that you are willing to receive on a connection, in bytes.

## Declaration

```swift
func maxUDPPayloadSize(_ size: Int) -> QUIC
```

## Parameters

- `size`: The maximum length, in bytes.
