mirror of
https://github.com/apple/swift-nio-extras
synced 2026-11-25 04:47:50 +00:00
* Adds a LengthFieldPrepender class to prepend the length onto a message. This class is a type of byte to message encoder. Motivation: To encode a prepended length field on data so that messages of arbitrary size can be sent. Can work as a pair with the ‘LengthFieldBasedFrameDecoder’. Modifications: Added ‘LengthFieldPrepender’ Added unit tests for ‘LengthFieldPrepender’ in ‘LengthFieldPrependerTest’ Updated the linux text files by running the script. Result: The length can now be easily prepended to any message.