quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.85k stars 394 forks source link

Use boxed AsyncUdpSocket when creating abstract endpoint #1595

Closed tthebst closed 1 year ago

tthebst commented 1 year ago

Wrapping the std socket with either TokioRuntime or AsyncStdRuntime returns Box<dyn AsyncUdpSocket>. Creating an endpoint with an abstract socket requires impl AsyncUdpSocket and it is therefore not possible to use a wrapped socket together with new_with_abstract_socket.

This MR fixes this inconsistency by using Box<dyn AsyncUdpSocket> in new_with_abstract_socket.