Xirsys.Sockets.Pipeline (xturn_sockets v2.0.0)
View SourceDeclarative multi-tier pipeline specification.
use Xirsys.Sockets.Pipeline
tier :root,
accumulator: {Xirsys.Sockets.Accumulator.LengthPrefixed, header_size: 2},
handler: MyApp.Handlers.Root
tier :inner,
accumulator: Xirsys.Sockets.Accumulator.Raw,
handler: MyApp.Handlers.Inner,
dispatch: :pool,
pool_size: 8
Summary
Functions
Builds fresh root-tier session maps (used for stateless UDP datagram handling).
Initializes root-tier accumulator and handler state maps for a connection.
Returns true when the pipeline declares more than the mandatory :root tier.
Resolves a compiled pipeline module or legacy {accumulator, handler} sugar
into a runtime %Pipeline{} struct.
Returns the %Pipeline.Tier{} specification for a tier key.
Types
@type t() :: %Xirsys.Sockets.Pipeline{ tiers: %{required(atom()) => Xirsys.Sockets.Pipeline.Tier.t()} }
Functions
Builds fresh root-tier session maps (used for stateless UDP datagram handling).
@spec init_session(t(), Xirsys.Sockets.Conn.t(), keyword()) :: {map(), map()}
Initializes root-tier accumulator and handler state maps for a connection.
Returns true when the pipeline declares more than the mandatory :root tier.
Resolves a compiled pipeline module or legacy {accumulator, handler} sugar
into a runtime %Pipeline{} struct.
Returns the %Pipeline.Tier{} specification for a tier key.