loqui v0.4.2 Loqui.Protocol.Codec behaviour

A Codec behaviour

Codecs turn terms into IOdata and IOdata into terms.

Summary

Callbacks

Decodes the IOdata into a term

Turns the given term into IOdata

The name of the codec used in the negotiation phase of the loqui protocol

Types

t()
t() :: module

Callbacks

decode(iodata)
decode(iodata) :: term

Decodes the IOdata into a term

encode(term)
encode(term) :: iodata

Turns the given term into IOdata

name()
name() :: String.t

The name of the codec used in the negotiation phase of the loqui protocol