TODO for new built-in SCTP stack
Author: ibcCreated May 26, 2026Updated Jun 28, 2026
Once the new built-in SCTP stack is merged, there are more tasks to do. Here some of them (if not all).
TODO
- Release new version of mediasoup Rust packages.
- In the doc add all new options such as
maxSendMessageSize,sctpXxx, etc, deprecate (or remove)maxMessageSizeandmaxSctpMessageSizeand document also the new default values inpipeToRouter(). - Fix the documentation in the website which says: "The underlaying SCTP association uses a common send buffer for all data consumers, hence the value given by this method indicates the data buffered for all data consumers in the transport."
- Test Chrome/Canary with I-DATA (message interleaving):
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary \ --force-fieldtrials="WebRTC-DataChannelMessageInterleaving/Enabled/" \ --enable-logging=stderr \ --v=1 \ - Rename all "Packet", "Chunk", "Parameter", "Error Cause", "Association", etc to lowcase everywhere (in code and comments).
- Rename all "I_DATA" etc to `I-DATA" everywhere (in code and comments).
- In
Transport::OnAssociationClosed()we may want to changeMS_WARN_TAG(sctp)toMS_DEBUG_TAG(sctp)or evenMS_DEBUG_DEV()when association is closed because client sends ABORT chunk (which is expected if client closes the browser abruptly). - Replicate missing tests of dcsctp.
-
Packet::ValidateCRC32cChecksum()is never called. - Vulnerability when using SCTP over plain/pipe transport: https://github.com/versatica/mediasoup/security/advisories/GHSA-p7x2-g5cq-fhmq
- Check if it would make sense to pass more fields in
SctpOptionsgiven to theAssociationinTransport.cpp. - In
transport.dump()(maybe also ingetStats()) we must properly obtain currentOSandMISaccording to the number of SCTP streams negotiated via INIT + INIT_ACK (if association is connected). - Use the
AssociationMetrics. Expose them in transport stats, etc. - Need Node/Rust tests for
dataConsumer->setBufferedAmountLowThreshold()and so on. In Rust there issmoke.rs. - Consider notifying the upper layer (Node, Rust) in
Transport::OnAssociationTotalBufferedAmountLow(). However take into account that we don't exposeSctpOptions::totalBufferedAmountLowThresholdto the upper layer. Or maybesctpTotalBufferedAmountLowThresholdcould be a new option inXxxxxTransportOptions. - In
sctpParametersTypes.ts,sctpParametersFbsUtils.tsandsctp_parameters.rs, deprecated fieldsMIS,OS,maxMessageSizestill exist for backwards compatibility. Must be removed in the future. - In
ReassemblyQueueclass, once we upgrade mediasoup to C++23, replacestd::vector<std::function<void()>> deferredActionswithstd::vector<std::move_only_function<void()>> deferredActions(see all related "TODO: SCTP" comments inReassemblyQueue.cppandReassemblyQueue.hpp). - TODO in mediasoup-client: https://github.com/versatica/mediasoup-client/issues/374
Source: versatica/mediasoup