Xirsys.XTurn.Binding (xturn v2.0.0)

Copy Markdown View Source

Handles STUN Binding requests (client address discovery).

What problem this solves

Before allocating a relay, a client often needs to learn its public IP and port as seen by the server (reflexive address). A Binding request asks the server to echo that mapping. With dual-homed listen and RFC 5780 attributes, the server can also advertise alternate addresses and honor CHANGE-REQUEST so ICE can classify NAT behavior.

Internal note

Invoked from Pipeline.do_request/1; not a public operator API.

RFCs

Summary

Functions

Processes a Binding request and attaches a %Conn{}.response.

Functions

process(conn)

Processes a Binding request and attaches a %Conn{}.response.

Handles modern (RFC 5389/5780) and classic (RFC 3489) binding forms. Sets reply_from / reply_to when CHANGE-REQUEST or RESPONSE-PORT apply.