-
Notifications
You must be signed in to change notification settings - Fork 6
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
Timer (interval) and threads #32
Comments
Well, actually, no thread is used. It's driven by whatever thread you call it with. Do you think this section of the FAQ is not clear enough?
Last time I checked there was some thread idling (but it doesn't do any harm). Could be that this has been fixed.
Right. But it's not in my hands. 🤷♀️ |
Yes, it's clear that it does not create threads. I failed to figure out that the |
BTW: do you consider (or have tested) whether polling |
Is there a reason you are using usrsctp-neat instead of the actual upstream usrsctp? The fork you are using is well over 600 commits behind the actual source of this library (which is terrifying from the perspective of a C library that might have random buffer overflows). I noticed this when following the link to see the "issue with the usrsctp dependency", was shocked that it had been open since 2018 with no response given that usrsctp is an actively maintained codebase, and then was like "wait, this isn't the real usrsctp repository :(". |
Not sure what you mean. #34 was merged a long time ago. 🙂 I'll update the readme. |
The "timer tick" could be more sophisticated but that isn't in my hands. I guess this can be closed then. |
The README clearly says that just a single thread is used, however it does not clarify whether the underlying usrsctp-neat just uses (or can use) a single thread or whether rawrtc-data-channel hides the multi-thread design of usrsctp-neat and exposes a single-thread API to the app.
Also, why does rawrtc-data-channel requires that the app initializes it with a
timer_handler
callback in which the app must "Start a timer that callsrawrtcdc_timer_tick
everyinterval
milliseconds"? Would not make more sense if rawrtc-data-channel knew when it must ask the sctp stack again so it can expose an API (similar toDTLSv1_get_timeout()
in OpenSSL) for the app to set a timer at that specific timeout and query rawrtc-data-channel for pending stuff within timer callback?Probably usrsctp-neat does not expose such an API so it cannot be done. However that would be proper way to go for integrating into a loop, right?.
The text was updated successfully, but these errors were encountered: