esl / jerboa

STUN/TURN encoder, decoder and client library in Elixir
https://www.erlang-solutions.com/products/mongooseim.html
Other
14 stars 6 forks source link

Encoding/decoding for LIFETIME attribute #40

Closed arkgil closed 7 years ago

arkgil commented 7 years ago

In https://tools.ietf.org/html/rfc5389#page-10 there is:

  def encode(p, a = %Attribute.XORMappedAddress{}) do
    encode_(0x0020, Attribute.XORMappedAddress.encode(p, a))
  end

  def decode(params, 0x0020, v) do
    Attribute.XORMappedAddress.decode params, v
  end

This task is about adding one clause to each of these functions, and creating a module with functions responsible for encoding and decoding Lifetime attribute's value, similar to what XORMappedAddress module does.

More info:

arkgil commented 7 years ago

Closed with #53