Xirsys.XTurn.Response (xturn v2.0.0)

Copy Markdown View Source

Pending STUN success or error attached to %Conn{} during pipeline processing.

What problem this solves

Action modules decide what to answer (success attributes or an error code) but should not encode wire format themselves. They set %Response{} on the conn; Conn.to_reply/1 adds SOFTWARE, fingerprint, realm, and nonce, then encodes via xmedialib.

Internal note

Not used by operators; created only inside server action handlers.

RFCs

Summary

Types

t()

Pending STUN response before wire encoding.

Types

t()

@type t() :: %Xirsys.XTurn.Response{
  attrs: map() | nil,
  class: atom() | nil,
  err_no: integer() | nil,
  message: binary() | nil
}

Pending STUN response before wire encoding.

Fields

  • :class - success class atom (e.g. :success) when building a success reply
  • :attrs - attribute map for success responses
  • :err_no - numeric STUN error code (e.g. 401, 437, 486)
  • :message - UTF-8 reason phrase for error responses