XMediaLib.Stun.decode
You're seeing just the function
decode
, go back to XMediaLib.Stun module for more information.
Accepts a STUN binary stream and attempts to convert it to readable packets for use by the greater application.
Example
iex> request = <<0, 1, 0, 0, 33, 18, 164, 66, 0, 146, 225, 0,
...> 61, 62, 163, 87, 45, 150, 223, 8>>
iex> XMediaLib.Stun.decode(request)
{:ok, %XMediaLib.Stun{ attrs: %{}, class: :request, fingerprint: false, integrity: false, key: nil, method: :binding, ns: nil, peer_id: nil, transactionid: 177565706535525809372192520}}