3 Commits

Author SHA1 Message Date
Liam
97ffd10cae Removes integer backing from ByteLength enum.
Motivation:
To simplify the enum from the calling perspective.

Modifications:
Removed integer backing.
Removed a string addition from a test that wasn’t actually adding anything.

Result:
The integer for the enum can not be seen publicly.
2018-11-19 18:53:17 +00:00
Liam
c0011b2df9 Conforms LengthFieldBasedDecoder to Swift Nio coding patterns and neatens unit tests.
Motivation:
Adding unit tests which both test and account for endianness.

Modifications:
Changed unit tests not to use the Swift Data type. Added self where necessary. Added a struct for data length.

Result:
The class is now more conferment to Swift nil standards and has testing which accounts for endianness.
2018-11-13 23:20:29 +00:00
Liam
509ee0b739 Adds a basic LengthFieldBasedFrameDecoder
Motivation:
Adding a popular type of decoder that is useful in real-world situations, particularly when dealing with protocol buffers.

Modifications:
Added the decoder class, tests and linux test files.

Result:
The project now includes a basic length field based decoder which can be built upon.
Further header specification may be required but this version suits basic usage.
2018-11-08 00:54:04 +00:00