View Source FLHook.Codec (FLHook Client v2.1.1)

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

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.

Types

@type codec() :: :unicode

Type describing the supported codecs.

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.