This class is very imperative and stateful, it decodes as much as it can, and remembers how far it got until it gets to the checksum at the end of the message.
This class is very imperative and stateful, it decodes as much as it can, and remembers how far it got until it gets to the checksum at the end of the message.
Look into iteratees if you want to be scala'd up.
The SfDecoder should only be used by one actor, and as such does not need to worry about thread safety.
I do not presume that each ByteString from the TCP layer is a complete message, which is why I am stateful ie you can call me multiple times with different bytestrings and end up with one message
Created by Jonathan during August 2016.