mirror of
https://github.com/apple/swift-nio-ssl
synced 2026-11-25 04:47:52 +00:00
Motivation: ByteBufferBIOs will grow their outbound buffer until flush is called. They will retain their capacity at however large it got to avoid reallocating, as they assume that your write pattern will be fairly consistent. In some cases this is a bad strategy, because it overcommits data. To allow users to reclaim this data, we can add a configuration option that will shrink the playload on the next write. Modifications: - Added support for ByteBufferBIO to shrink the payload. - Plumbed up support for handler configuration. - Tests that shrinkage actually works. Result: Users can reclaim memory.