Skip to content

Decoder

Malachi edited this page Jun 26, 2018 · 1 revision

Decoder is comprised of:

  • Header Decoder
  • Token Decoder
  • Option Decoder

and also a kind of pass-thru Payload Decoder

Decoder maintains some minimal state, mostly to cohesively decode options.

Decoder::Context maintains a separate state, focused primarily on data input. We break this out because incoming chunked data may come from arbitrary places at arbitrary times, so during any given message decode Decoder itself remains relatively linear in its state, but Decoder::Context may be changed or reassigned completely.

That said, under frequently simple conditions where incoming message buffer is one singular contiguous buffer, only one commensurate Decoder::Context is needed.

Clone this wiki locally