In-memory TURN channel binding for one peer on an allocation.
What problem this solves
Each ChannelBind creates state the allocation worker must refresh before expiry. This struct holds the channel number, owning 5-tuple, peer address, and the refresh timer reference.
Internal
Used inside allocation workers; not part of the public application API.
RFCs
- RFC 5766 - channel bindings and refresh (pt.11)
Summary
Types
Channel number in the range 0x4000-0x7FFE, or nil before bind.
Bound peer {ip, port}.
Channel binding held by an allocation worker.
Reference for the channel refresh timer, or nil.
Allocation 5-tuple map used as the binding scope.
Types
@type channel_id() :: non_neg_integer() | nil
Channel number in the range 0x4000-0x7FFE, or nil before bind.
@type peer_address() :: {:inet.ip_address(), pos_integer()} | nil
Bound peer {ip, port}.
@type t() :: %Xirsys.XTurn.Channels.Channel{ id: channel_id(), peer_address: peer_address(), timer: timer_ref(), tuple5: tuple5() }
Channel binding held by an allocation worker.
Fields
:id- channel number (0x4000-0x7FFE), ornilbefore bind:tuple5- owning allocation 5-tuple map, ornil:peer_address- bound peer{ip, port}, ornil:timer- refresh timer reference, ornil
@type timer_ref() :: reference() | nil
Reference for the channel refresh timer, or nil.
@type tuple5() :: map() | nil
Allocation 5-tuple map used as the binding scope.