Skip to content

Commit 2ea8579

Browse files
authored
Merge pull request #20783 from moiseev/network-max-dg-size
[overlay] Expose NWConnection.maximumDatagramSize
2 parents 7531fd3 + 90e9647 commit 2ea8579

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

stdlib/public/SDK/Network/NWConnection.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ public final class NWConnection : CustomDebugStringConvertible {
102102
}
103103
}
104104

105+
/// Retrieve the maximum datagram size that can be sent
106+
/// on the connection. Any datagrams sent should be less
107+
/// than or equal to this size.
108+
public var maximumDatagramSize: Int {
109+
get {
110+
return Int(nw_connection_get_maximum_datagram_size(self.nw))
111+
}
112+
}
113+
105114
private var _currentPath: NWPath? = nil
106115

107116
/// Current path for the connection, which can be used to extract interface and effective endpoint information

0 commit comments

Comments
 (0)