Implement "SCTP Negotiation Acceleration Protocol" when ready
Author: ibcCreated Sep 4, 2026Updated Sep 4, 2026
Labelsfeature
Context
- Draft: "SNAP: SCTP Negotiation Acceleration Protocol" https://datatracker.ietf.org/doc/html/draft-hancke-tsvwg-snap
Abstract WebRTC Data Channels use the Stream Control Transmission Protocol (SCTP) over a Datagram Transport Layer Security (DTLS) association. The standard SCTP connection establishment requires a handshake that introduces latency. This document specifies a method to accelerate the datachannel establishment by embedding the SCTP initialization parameters within the Session Description Protocol (SDP) offer/answer exchange. This reduces the time required to open a data channel by up to two network round-trip times.
- Ticket in libwebrtc: https://issues.webrtc.org/issues/426480601
- Code already available in libwebrtc under
WebRTC-Sctp-Snapfield trial (seewebrtc/pc/peer_connection.cc).
Notes
- Notice that there is no need to exchange/validate SCTP Cookie since ICE and DTLS mechanism replaces it. So basically, the SDP offer and answer only contain a SCTP INIT chunk (of peer A and peer B). There is no need for INIT_ACK which is the same as a INIT chunk + cookie.
- Run Canary with SNAP enabled in macos:
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary \ --enable-logging=stderr --v=1 \ --vmodule='*/webrtc/*=9,*dcsctp*=9,*sctp*=9,*data_channel*=9,*=-2' \ --autoplay-policy=no-user-gesture-required \ --force-fieldtrials='WebRTC-Sctp-Snap/Enabled/' \ --disable-field-trial-config \ "$@" 2>&1 | tee webrtc.log
Source: versatica/mediasoup