mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
* optional max payload size for ByteToMessageDecoder Motivation: ByteToMessageDecoder aggregate data in memory as part of their normal operation. the ability to limit how much they aggregate is critical in many real-life applications Modifications: * add optional maximumBufferSize argument to ByteToMessageDecoder initializer * test for buffer size when maximumBufferSize is set and throw ByteToMessageDecoderError.payloadTooLarge error Result: users can limit how much memory ByteToMessageDecoder takes and handle the exception on their end