Open lgrahl opened 6 years ago
Why are you using everywhere in your code "const"?
For the same reason everything in Rust is immutable by default: It can be optimised by the compiler.
Is this your work for NEAT? https://github.com/NEAT-project/neat/blob/master/neat_webrtc_tools.h I can't beleiving it. It uses rawrtc stack on top of libuv loop!
I'm not working on that project. They use RAWRTC but have also sponsored development of this library. You can find the libuv compatible branch here: https://github.com/rawrtc/re/tree/rawrtc-neat
To Do:
rawrtc_sctp_context
Enter event loop thread (?)Leave event loop thread (?)rawrtc_sctp_transport_feed_inbound
rawrtc_sctp_transport_set_mtu
rawrtc_sctp_transport_get_mtu
rawrtc_sctp_transport_enable_mtu_discovery
rawrtc_sctp_transport_set_context
rawrtcdc_timer_tick
struct rawrtc_data_channel_options
.rawrtc_sctp_transport_get_capabilities
intosctp_transport.c
rawrtc_sctp_transport_state_to_name
to the bottom ofsctp_transport.c
TODO
itemsenum rawrtc_code
.p
will usually be de-referenced and it's value will be changed. The documentation of the parameter will clearly indicate whether or not that's the case.re_enter_thread
(you can set your own mutex by callingre_set_mutex(your_mutex)
) before calling functions of this library. Some event loops always hold a lock implicitly when handling callbacks. So, if the event loop's mutex has been applied and if used inside such a context, you do not need to lock explicitly.re_enter_thread
, you need to explicitly unlock by callingre_leave_thread
.rawrtcdc_internal.h
. Be aware, there may be breaking API changes even between minor versions when accessing non-public functions and structures. If you're missing something essential, create a new issue or make a pull request instead of using the internal API.mem_deref
stuff that's being used inside of a handler function called by RAWRTCDC or you will see segfaults. Instead, schedule removal and do it after the handler function returned.rawrtc*.h
rawrtc*_configuration.h
headerrawrtc*_internal.h
header5
) across libraries. Test this insiderawrtc-terminal-demo
.Afterwards:
mem_ref
of the channel when callingrawrtc_data_channel_handler
or close the channel immediately. (No implicit reference anymore.)const * const
orconst* const
- decide!rawrtc_data_transport_pause_incoming(true/false)
)