[usrsctp] Use usrsctp_get_timeout() when available #1011
Open
Description
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:
- PR (merged and released long ago) adding single-thread usage to usrsctp: Single thread sctplab/usrsctp#339
- Issue motivating single-thread PR (closed since above PR was merged, and despite its title, its closing PR didn't add any
usrsctp_get_timeout()
function): single-thread API: add usrsctp_get_timeout() sctplab/usrsctp#349 - Not merged (and obviously ignored) PR adding proper
usrsctp_get_timeout()
: Add usrsctp_get_timeout() sctplab/usrsctp#591 - Usage example of
usrsctp_get_timeout()
in another project: https://github.com/frida/frida-core/blob/ab2581a0b7faea22d87a33c1cc6f2aab8bd88ece/lib/base/p2p-glue.c#L347
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.