View Source FLHook.Codec (FLHook Client v1.0.0)

A module that is responsible for decoding and encoding data streams from and to the FLHook socket.

Link to this section Summary

Types

Type describing the supported codecs.

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

Specs

codec() :: :unicode

Type describing the supported codecs.

Link to this section Functions

Specs

decode(codec(), binary()) :: {:ok, String.t()} | {:error, FLHook.CodecError.t()}

Decodes binary data from the socket using the specified codec.

Specs

encode(codec(), String.t()) :: {:ok, binary()} | {:error, FLHook.CodecError.t()}

Encodes strings that will be sent to the socket using the specified codec.