View Source FLHook.Codec (FLHook Client v2.0.0)
A module that is responsible for decoding and encoding data streams from and to the FLHook socket.
Link to this section Summary
Functions
Decodes binary data from the socket using the specified codec.
Encodes strings that will be sent to the socket using the specified codec.
Link to this section Types
@type codec() :: :unicode
Type describing the supported codecs.
Link to this section Functions
@spec decode(codec(), binary()) :: {:ok, String.t()} | {:error, FLHook.CodecError.t()}
Decodes binary data from the socket using the specified codec.
@spec encode(codec(), String.t()) :: {:ok, binary()} | {:error, FLHook.CodecError.t()}
Encodes strings that will be sent to the socket using the specified codec.