Skip to content

New built-in SCTP stack#1806

Merged
ibc merged 27 commits into
v3from
sctp-part-16
May 26, 2026
Merged

New built-in SCTP stack#1806
ibc merged 27 commits into
v3from
sctp-part-16

Conversation

@ibc
Copy link
Copy Markdown
Member

@ibc ibc commented May 21, 2026

Details

  • New built-in SCTP stack that replaces usrsctp.
  • Breaking change: Remove useBuiltInSctpStack option in WorkerSettngs.
  • Breaking change: Remove SctpCapabilities type. No longer needed.
  • WebRtcTransport, PlainTransport, PipeTransport: Add sctpNegotiatedCapabilities() getter.
  • Breaking change: WebRtcTransport, PlainTransport, PipeTransport options: Remove numSctpStreams and maxSctpMessageSize, and add maxSendMessageSize, maxReceiveMessageSize, sctpPerStreamSendQueueLimit and sctpMaxReceiverWindowBufferSize.
  • Breaking change: DirectTransport options: Remove maxMessageSize, and add maxSendMessageSize and maxReceiveMessageSize.
  • Breaking change: Change SctpParameters type from { port, OS, MIS, maxMessageSize } to { port, maxSendMessageSize, maxReceiveMessageSize, sendBufferSize, perStreamSendQueueLimit, maxReceiverWindowBufferSize, isDataChannel}.

Notes

ibc added 4 commits May 20, 2026 18:07
# Details

- Add `SctpOptions::Dump()`.
- Increase channel max message/payload length (just because it's free).
- Cosmetic and more SCPT TODO items.
Comment thread node/src/test/test-DataConsumer.ts Outdated
Comment thread node/src/PipeTransportTypes.ts Outdated
Comment thread node/src/PlainTransportTypes.ts Outdated
Comment thread node/src/Router.ts
Comment thread node/src/Router.ts
Comment thread node/src/WebRtcTransportTypes.ts
Comment thread worker/include/RTC/SCTP/association/Association.hpp
Comment thread worker/include/RTC/SCTP/public/AssociationInterface.hpp
Comment thread worker/include/RTC/SctpAssociation.hpp Outdated
Comment thread worker/include/RTC/SctpAssociation.hpp Outdated
@jmillan jmillan self-requested a review May 21, 2026 18:43
@ibc
Copy link
Copy Markdown
Member Author

ibc commented May 22, 2026

@jmillan I've pushed those typo fixes mentioned above in my last commit plus Rust part 1.

@ibc ibc marked this pull request as ready for review May 22, 2026 10:45
@threema-lenny
Copy link
Copy Markdown

threema-lenny commented May 22, 2026

Apologies for hijacking this thread to ask a question related to the SCTP rework: We (Threema) use the data channels fairly extensively via mediasoup. Would you be interested in getting feedback, and if so, when would be a good place to start testing?

@ibc
Copy link
Copy Markdown
Member Author

ibc commented May 22, 2026

Apologies for hijacking this thread to ask a question related to the SCTP rework: We (Threema) use the data channels fairly extensively via mediasoup. Would you be interested in getting feedback, and if so, when would be a good place to start testing?

There will be another PR after this to complete pending TODO items. See TODO_SCTP.md file in this branch.

I will announce it in Announcements category in the mediasoup forum.

The useBuiltInSctpStack option in createWorker() (defaults to false for now) will exist until this is fully tested and feedback is received.

@ibc ibc changed the title SCTP - Part 16 New built-in SCTP stack May 22, 2026
@ibc ibc marked this pull request as draft May 22, 2026 19:49
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread worker/src/RTC/DataConsumer.cpp
@ibc
Copy link
Copy Markdown
Member Author

ibc commented May 22, 2026

TODO 1

UPDATE: Fixed.

rust/integration/smoke.rs test gets stuck:

cargo test --test integration smoke::

    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.19s
     Running tests/integration/main.rs (/Volumes/src-cs/mediasoup/target/debug/deps/integration-e713b03692d22943)

running 1 test (forever)

@ibc
Copy link
Copy Markdown
Member Author

ibc commented May 24, 2026

The useBuiltInSctpStack option in createWorker() (defaults to false for now) will exist until this is fully tested and feedback is received.

Note: Radical change here. This PR will NOT keep usrsctp or the useBuiltInSctpStack option in createWorker(). Please re-read the updated PR description above.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread worker/fuzzer/src/RTC/FuzzerRateCalculator.cpp
Comment thread worker/fuzzer/src/RTC/FuzzerSeqManager.cpp
Comment thread worker/fuzzer/src/RTC/FuzzerTrendCalculator.cpp
Comment thread worker/fuzzer/src/RTC/RTP/FuzzerRetransmissionBuffer.cpp
Comment thread worker/fuzzer/src/RTC/RTP/FuzzerRtpStreamSend.cpp
Comment thread worker/fuzzer/src/RTC/SCTP/association/FuzzerStateCookie.cpp
Comment thread worker/test/src/RTC/SCTP/association/TestTransmissionControlBlock.cpp Outdated
Comment thread worker/test/src/RTC/SCTP/association/TestTransmissionControlBlock.cpp Outdated
@ibc ibc mentioned this pull request May 26, 2026
14 tasks
@ibc ibc marked this pull request as ready for review May 26, 2026 12:25
@ibc
Copy link
Copy Markdown
Member Author

ibc commented May 26, 2026

@threema-lenny this branch is ready to test. Please read the PR description and take into account that, even if I didn't say it in there, the SCTP parameters generated by this mediasoup branch are still compatible with those that mediasoup-client requires.

@ibc ibc merged commit 6802041 into v3 May 26, 2026
43 checks passed
@ibc ibc deleted the sctp-part-16 branch May 26, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants