Xirsys.Sockets.Sctp.Dcep (xturn_sockets v2.2.1)
View SourceData Channel Establishment Protocol (DCEP) encode and decode.
What problem this solves
WebRTC data channels negotiate labels, ordering, and reliability with DCEP
messages on SCTP PPI 50 before user data flows. This module parses and builds
DCEP Open and Ack payloads used by SctpAssociation.
RFCs
Summary
Functions
Decodes a DCEP message from an SCTP user message body (after the type byte).
Encodes a DCEP struct (Ack or Open) to wire bytes.
Functions
@spec decode(binary()) :: {:ok, Xirsys.Sockets.Sctp.Dcep.Ack.t() | Xirsys.Sockets.Sctp.Dcep.Open.t()} | :error
Decodes a DCEP message from an SCTP user message body (after the type byte).
Returns {:ok, %Ack{}} or {:ok, %Open{}}, or :error on malformed input.
@spec encode(Xirsys.Sockets.Sctp.Dcep.Ack.t() | Xirsys.Sockets.Sctp.Dcep.Open.t()) :: binary()
Encodes a DCEP struct (Ack or Open) to wire bytes.