Xirsys.XTurn.ClientWorker (xturn v2.0.0)

Copy Markdown View Source

GenServer shard that runs the STUN/TURN control pipeline.

What problem this solves

Control requests from many clients must not block each other on one process. The pool hashes each client endpoint to a worker; this GenServer builds %Conn{}, runs Pipeline.process_message/1, encodes replies, and sends them on the client socket or an RFC 5780 alternate path.

Internal note

Started by ClientWorker.Pool; not invoked by operators.

RFCs

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts a named worker; :name is required in opts.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

Starts a named worker; :name is required in opts.