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

STUN Message Class

Link to this section Summary

Functions

Converts class from an integer into an atom.

Converts class from an atom into an integer.

Link to this section Types

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

Link to this section 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.