Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to low-level quinn details in client #150

Open
MOZGIII opened this issue Mar 24, 2024 · 3 comments
Open

Access to low-level quinn details in client #150

MOZGIII opened this issue Mar 24, 2024 · 3 comments

Comments

@MOZGIII
Copy link
Contributor

MOZGIII commented Mar 24, 2024

I need to set quinn transport congestion control to BBR, but there's no way to do it currently. It would be great to have a lower level access there, maybe to instantiate wtransport client (and server?) for a pre-made quinn::Endpoint.

I'm intentionally not providing an implementation this time before the discussion.

@BiagioFesta
Copy link
Owner

It should be possible by configuring the transport, shouldn't it?

https://docs.rs/wtransport/latest/wtransport/struct.ClientConfig.html#method.quic_config_mut

Client example:

use std::sync::Arc;
use wtransport::quinn::congestion::BbrConfig;
use wtransport::quinn::TransportConfig;
use wtransport::ClientConfig;
use wtransport::Endpoint;

#[tokio::main]
async fn main() {
    let mut transport_config = TransportConfig::default();
    transport_config.congestion_controller_factory(Arc::new(BbrConfig::default()));

    let mut client_config = ClientConfig::default();
    client_config
        .quic_config_mut()
        .transport_config(Arc::new(transport_config));

    let connection = Endpoint::client(client_config)
        .unwrap()
        .connect("https://example.com")
        .await
        .unwrap();
}

@MOZGIII
Copy link
Contributor Author

MOZGIII commented Apr 9, 2024

I want to alter an already setup endpoint though

@BiagioFesta
Copy link
Owner

Endpoint::reload_config maybe?

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

No branches or pull requests

2 participants