View Source ExSTUN.Message.Class (ex_stun v0.2.0)

STUN Message Class

Summary

Functions

Converts class from an integer into an atom.

Converts class from an atom into an integer.

Types

@type t() :: :request | :success_response | :error_response | :indication

Functions

@spec from_value(non_neg_integer()) :: {:ok, t()} | {:error, :unknown_class}

Converts class from an integer into an atom.

@spec to_value(t()) :: 0 | 1 | 2 | 3

Converts class from an atom into an integer.