Xirsys.Sockets.TierSession (xturn_sockets v2.2.1)

View Source

Worker that owns one async pipeline tier's accumulator and handler state.

Started by Engine when a tier uses dispatch: :task or dispatch: :pool. Messages are {:push, payload, meta} casts from the parent connection.

Internal API. Spawned by the drain engine; not part of the public application surface for host apps.

What problem this solves

Heavy or isolatable pipeline tiers (for example media processing) must not block the connection process. Each async tier gets its own GenServer with private accumulator state while replies still route through the parent transport.

RFCs

No STUN/TURN RFC; framing/dispatch infrastructure for XTurn listeners.

Summary

Functions

Temporary child spec so a crashed tier is not restarted in-place.

Starts a session for one tier of one connection.

Functions

child_spec(init_arg)

Temporary child spec so a crashed tier is not restarted in-place.

Parameters

start_link(opts)

Starts a session for one tier of one connection.

Parameters

opts is a keyword list:

  • :pipeline - compiled %Pipeline{}
  • :tier_key - tier being isolated
  • :conn - parent Conn
  • :owner - parent connection pid (monitored)
  • :transport - transport module for replies