Xirsys.Sockets.TierSupervisor (xturn_sockets v2.2.1)

View Source

Dynamic supervisor for async pipeline tier session workers.

What problem this solves

Pipeline tiers configured with dispatch: :task or :pool run handler work in separate TierSession processes so the owning Connection or DatagramServer can keep relaying without blocking. This module is the generic DynamicSupervisor that starts those workers.

Use TierSupervisor.Task or TierSupervisor.Pool for named instances with appropriate child limits.

Internal note

OTP supervision only; tier handlers implement application protocol logic.

RFCs

  • No STUN/TURN RFC; OTP supervision for async pipeline dispatch

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts a named supervisor for tier session workers.

Starts one TierSession under supervisor.

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

Starts a named supervisor for tier session workers.

Parameters

  • opts - :name (required), :max_children (default :infinity)

start_session(supervisor, opts)

@spec start_session(
  atom(),
  keyword()
) :: DynamicSupervisor.on_start_child()

Starts one TierSession under supervisor.

Parameters

  • supervisor - registered name or pid
  • opts - forwarded to TierSession.start_link/1