Skip to content

Expose how the SCTP association recovered its data - #10

Merged
electronicboy merged 2 commits into
opencollab-incubator:mainfrom
electronicboy:shane/sctp-assoc-recovery
Dec 1, 2026
Merged

electronicboy merged 2 commits into
opencollab-incubator:mainfrom
electronicboy:shane/sctp-assoc-recovery

Conversation

@electronicboy

@electronicboy electronicboy commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Exposes opencollab-incubator/libdatachannel#7's per-association recovery counters on SctpStats:

  • fastRetransmits(): packets sent by fast retransmit, after gap reports;
  • retransmittedChunks(): DATA chunks sent again, by fast retransmit or timeout;
  • gapSacks(): SACKs received that reported gaps;
  • duplicateTsnsReceived(): DATA chunks received that had already arrived.

Together with dataTimeouts(), they show how an association's data is being recovered. That's what was needed to watch the usrsctp T3-rtx fix (opencollab-incubator/usrsctp#1) on real players. native_peer.cpp passes them through SctpStats.create.

Submodule

Testing

  • :compileJava passes, and this repo's native build matrix runs on this PR against the libdatachannel commit above.
  • The same Java and JNI change has run in CubeCraft's production proxies since 16 Nov, exported as Prometheus counters.

Brings in opencollab-incubator/libdatachannel#7's per-association SCTP recovery counters, with
opencollab-incubator/usrsctp#2 and opencollab-incubator#3 counting them, and opencollab-incubator#8's configurable Data Channel DSCP. The
DSCP fields sit in rtcConfiguration ahead of iceUdpMuxDirect; native_peer.cpp zero-initialises the
struct and sets fields by name, so peers keep AF11 until a setting exposes it.
SctpStats gains fastRetransmits(), retransmittedChunks(), gapSacks() and duplicateTsnsReceived():
an association's own fast retransmits, DATA chunks sent again, SACKs that reported gaps and duplicate
DATA received, which together with dataTimeouts() say how its data is being recovered.
@electronicboy
electronicboy force-pushed the shane/sctp-assoc-recovery branch from 21a362b to bb0b318 Compare December 1, 2026 09:24
@electronicboy
electronicboy merged commit ee0d935 into opencollab-incubator:main Dec 1, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant