# xgw v0.1.0 - Table of Contents > WebRTC ICE/DTLS/SRTP gateway for XTurn. ## Pages - [XGW](readme.md) ## Modules - [XGW](XGW.md): XGW is a **media gateway**: it sits between a browser (or other WebRTC client) and your application so you do not have to implement ICE, DTLS, and SRTP yourself. - [XGW.Application](XGW.Application.md): OTP application entry for XGW. - [XGW.Certs](XGW.Certs.md): Creates and fingerprints the TLS certificate used for DTLS. - [XGW.DTLS](XGW.DTLS.md): Starts and completes the DTLS handshake that unlocks encrypted media keys. - [XGW.DTLS.OtpDemux](XGW.DTLS.OtpDemux.md): Patches Erlang/OTP's DTLS packet demux so XGW can share one UDP socket. - [XGW.DTLS.SrtpKeys](XGW.DTLS.SrtpKeys.md): Turns a finished DTLS handshake into the keys SRTP needs for media. - [XGW.DTLS.Transport](XGW.DTLS.Transport.md): Adapts OTP `:ssl` DTLS to XGW's shared Listener socket. - [XGW.Demux](XGW.Demux.md): Separates mixed UDP packets that share one socket into STUN, DTLS, and media. - [XGW.Descriptions](XGW.Descriptions.md): Turns negotiated Session Description Protocol (SDP) text into a transport config map that `XGW.Peer` can use. - [XGW.ICE](XGW.ICE.md): Shared Interactive Connectivity Establishment (ICE) types and pure helpers. - [XGW.ICE.Binding](XGW.ICE.Binding.md): Builds and validates STUN Binding messages used as ICE connectivity checks. - [XGW.ICE.Checklist](XGW.ICE.Checklist.md): Forms, sorts, and advances ICE candidate **pairs** through check states. - [XGW.ICE.Consent](XGW.ICE.Consent.md): Keeps an already-selected ICE path "alive" (consent freshness, RFC 7675). - [XGW.ICE.Full](XGW.ICE.Full.md): Full ICE agent: gather candidates, run the checklist, nominate a pair. - [XGW.ICE.Gather](XGW.ICE.Gather.md): Discovers ICE candidates: host, server-reflexive (srflx), and TURN relay. - [XGW.ICE.Lite](XGW.ICE.Lite.md): ICE-lite agent: answer inbound STUN checks in the controlled role. - [XGW.Listener](XGW.Listener.md): Shared UDP (and optional TCP) socket that receives all WebRTC traffic for many peers and routes each packet to the right `XGW.Peer`. - [XGW.Listener.TCP](XGW.Listener.TCP.md): Accepts ICE-TCP connections and delivers framed STUN to `XGW.Listener`. - [XGW.Peer](XGW.Peer.md): One remote WebRTC client: runs ICE, DTLS, and SRTP, then gives your app plaintext media and data-channel events. - [XGW.Peer.Datachannel](XGW.Peer.Datachannel.md): Per-Peer process that owns SCTP and DTLS application-data for data channels. - [XGW.Peer.Gather](XGW.Peer.Gather.md): Post-SDP local candidate checks and background srflx/relay gather for a Peer. - [XGW.Peer.Sctp](XGW.Peer.Sctp.md): Starts and drives the SCTP association used for WebRTC data channels. - [XGW.Peer.SendHandle](XGW.Peer.SendHandle.md): Hot-path outbound RTP without GenServer hops on Peer or Listener. - [XGW.Peer.Turn](XGW.Peer.Turn.md): Peer-side TURN lifecycle: allocate, refresh, unwrap, and encode relay traffic. - [XGW.SRTPSession](XGW.SRTPSession.md): Encrypts and decrypts media packets for one Peer after DTLS succeeds. - [XGW.Spike.HTTP](XGW.Spike.HTTP.md): Plug router for the browser spike: static index, SDP offer/answer, trickle ICE. - [XGW.Spike.SDP](XGW.Spike.SDP.md): Minimal SDP answer builder and helpers for the browser spike (`mix xgw.spike`). - [XGW.Spike.Server](XGW.Spike.Server.md): Browser spike GenServer: one Listener + Peer, SDP answer, trickle ICE, status. - [XGW.Stun.TCP](XGW.Stun.TCP.md): Frames STUN messages for transport over TCP (RFC 8489). - [XGW.TURN.Client](XGW.TURN.Client.md): Client for TURN: allocate a relay address and send/receive through it. - [XGW.Trunk.Crypto](XGW.Trunk.Crypto.md): Static-key SRTP for inter-edge trunk pipes. - [XGW.Trunk.Frame](XGW.Trunk.Frame.md): Multiplex header for inter-edge trunk UDP payloads. - [XGW.Trunk.Pipe](XGW.Trunk.Pipe.md): Bidirectional UDP + SRTP trunk between media edges. ## Mix Tasks - [mix xgw.spike](Mix.Tasks.Xgw.Spike.md): Lab Mix task: run a browser-facing DTLS-SRTP spike against a local XGW stack.