mirror of
https://github.com/apple/swift-nio-extras.git
synced 2025-05-14 17:02:43 +08: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.