Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[usrsctp] Use usrsctp_get_timeout() when available #1011

Open
ibc opened this issue Feb 13, 2023 · 0 comments
Open

[usrsctp] Use usrsctp_get_timeout() when available #1011

ibc opened this issue Feb 13, 2023 · 0 comments
Assignees
Milestone

Comments

@ibc
Copy link
Member

ibc commented Feb 13, 2023

There is a PR in usrsctp project adding a proper usrsctp_get_timeout(), which is definitely missing in usrsctp for a proper single-thread usage.

References:

Such a new PR sctplab/usrsctp#591 would make mediasoup way more efficient by using usrsctp_get_timeout() rather than having a periodic timer checking usrsctp state every 10ms (see Checker class in DepUsrSCTP.cpp). However, for this to happen we must promote that PR in usrsctp project so it gets merged and new version released.

@ibc ibc added this to the v3 updates milestone Feb 13, 2023
@ibc ibc removed the usrsctp label Nov 8, 2023
ibc added a commit that referenced this issue Mar 5, 2024
### Details

- Related task: #1011. Note that usrsctp author never cared about the existing PR so we are on our own.
- So I've forked usrctp, added the `usrsctp_get_timeout()` feature and released version 0.9.6.0: versatica/usrsctp#1
- And I've made `usrsctp.wrap` point to it.

### Notes

- It would be great to have a way to pass `sctp_debug=true` when building usrsctp Meson subproject so it defines `SCTP_DEBUG` (needed in `DepUsrSCTP.cpp` to show SCTP debug). An manual alternative is to edit `meson.build` of usrsctp and add it unconditionally.
- I'm calling `HandleUsrSctpTimers()` everytime the timer fires (of course), also in `onSendSctpData` callback and also when SCTP data is received (in `SctpAssociation::ProcessSctpData()`. Not sure if correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants