Skip to content

Conversation

@jhiatt-verkada
Copy link

No description provided.

This crate offers a generic wrapper over the 'first-party'
implementations of the `WebTransport` trait and its associated types.
This trait is not dyn-compatible, so this is an ergonomic option for
code that should return multiple possible implementors, e.g. a
QUIC connection with a possible fallback on WebSockets.
@kixelated
Copy link
Collaborator

Hmm, I think this could go into web_transport. In the past I've used enum_dispatch to avoid the boilerplate, but that requires a trait.

...maybe web-transport-trait could be moved into web-transport and we use enum_dispatch to support all enabled implementations (via feature flag)? I'll try.

@kixelated
Copy link
Collaborator

I spent a few hours implementing a full enum for web_transport. I'm just not sure if it really accomplishes much; I need to sleep on it.

I mentioned it in the MoQ repo, but do we even need this enum? If you have moq_native return an enum instead, it can instantiate moq_lite based on the result. The really nice thing about that API is that the underlying web_transport_trait doesn't leak into the API, so it should be enough to instantiate moq_lite based on if the fallback succeeded or not.

@jhiatt-verkada
Copy link
Author

This is no longer needed: moq-dev/moq#812

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants