webrtc-rs / webrtc

A pure Rust implementation of WebRTC
https://webrtc.rs
Apache License 2.0
4.08k stars 363 forks source link

Add as_any to Conn trait for accessing underlying Conn #465

Closed jaredwolff closed 5 months ago

jaredwolff commented 1 year ago

This allows you to access the inner connection state of the DTLS connection. Having the connection identity is helpful in server code.

codecov[bot] commented 1 year ago

Codecov Report

Attention: Patch coverage is 11.11111% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 61.65%. Comparing base (a97d49e) to head (ee9b09d).

Files Patch % Lines
ice/src/agent/agent_test.rs 0.00% 2 Missing :warning:
ice/src/agent/agent_transport.rs 0.00% 2 Missing :warning:
ice/src/agent/agent_vnet_test.rs 0.00% 2 Missing :warning:
ice/src/udp_mux/udp_mux_conn.rs 0.00% 2 Missing :warning:
.../association_internal/association_internal_test.rs 0.00% 2 Missing :warning:
util/src/conn/conn_bridge.rs 0.00% 2 Missing :warning:
util/src/conn/conn_disconnected_packet.rs 0.00% 2 Missing :warning:
util/src/conn/conn_pipe.rs 0.00% 2 Missing :warning:
util/src/conn/conn_udp.rs 0.00% 2 Missing :warning:
util/src/conn/conn_udp_listener.rs 0.00% 2 Missing :warning:
... and 2 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #465 +/- ## ========================================== - Coverage 61.71% 61.65% -0.06% ========================================== Files 529 529 Lines 48828 48852 +24 Branches 12250 12260 +10 ========================================== - Hits 30134 30121 -13 - Misses 9532 9572 +40 + Partials 9162 9159 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jaredwolff commented 1 year ago

Missed this. Thanks @rainliu! I was having a bunch of trouble understanding/getting the downcast to work. Let me try it and then update this PR if it works out.