webrtc-rs/webrtc

[ICE/DTLS/SCTP] refactoring internal protocol implementation with deterministic state machine and less Mutex

rainliu opened this issue · 2 comments

currently ICE/DTLS/SCTP implementations follow gorountine style, instead of idiomatic rust style. Try to refactor them to more idiomatic rust style with less Mutex.

We should follow quinn's implementation: https://github.com/quinn-rs/quinn

  • quinn-proto: Deterministic state machine of the protocol which performs no I/O internally and is suitable for use with custom event loops (and potentially a C or C++ API).
  • quinn: High-level async API based on tokio, see for usage. This will be used by most developers. (Basic benchmarks are included.)

I have some work on this front (for ICE) in a separate repository if it would be interesting.

https://github.com/ystreet/librice/tree/main/librice-proto