mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation: As described in issue [#2877](https://github.com/apple/swift-nio/issues/2877), there is no API available to specify allowing a read of unlimited size. Modifications: - Add a new `public static` property, `unlimited`, to `ByteCount` representing an unlimited amount of bytes. - Adapt `ReadableFileHandleProtocol.readToEnd(fromAbsoluteOffset:maximumSizeAllowed:)` to work with `maximumSizeAllowed` being `ByteCount.unlimited`. Result: An API to specify allowing a read of an unlimited size will be available.