mirror of
https://github.com/apple/swift-nio
synced 2026-11-22 04:30:41 +00:00
### Motivation SwiftNIO provides convenience functions for a range of socket options. This PR adds convenience options for fragmentation-related socket options on Darwin and Linux. One particular use case is disabling fragmentation when using QUIC, which disallows IP fragmentation of its datagrams. ### Modifications * Add `NIOBSDSocket.Option.ip_dontfrag` (Darwin). * Add `NIOBSDSocket.Option.ipv6_dontfrag` (Darwin and Linux). * Add `NIOBSDSocket.Option.ip_mtu_discover` and `.ipv6_mtu_discover` (Linux). They set the path MTU discovery mode, which influences fragmentation. ### Result Adopters can easily configure IP fragmentation.