Skip to content

Implement QUIC traits with Quinn #4

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

Merged
merged 4 commits into from
Aug 7, 2020
Merged

Implement QUIC traits with Quinn #4

merged 4 commits into from
Aug 7, 2020

Conversation

stammw
Copy link
Contributor

@stammw stammw commented Aug 2, 2020

Here is a completely untested QUIC traits implementation with quinn.

It's based on #3 and contains some change suggestions to it. The draft status should disappear along with them.

@seanmonstar
Copy link
Member

I've merged #3. This looks really cool! I think we could have the integrations be in a separate crate, especially since this is creating new structs to implement the traits on anyways. We could create an h3-quinn directory with these types. I'm happy to do that busywork if you want.

@stammw
Copy link
Contributor Author

stammw commented Aug 3, 2020

Yeah that makes more sense. Thanks!

@stammw stammw force-pushed the quinn branch 2 times, most recently from ab5b4c5 to 8ec3938 Compare August 4, 2020 05:29
@stammw
Copy link
Contributor Author

stammw commented Aug 4, 2020

So I've got this sorted out with workspaces. I hope this what you meant ?

I also got rid of Pin<&mut Self> params.

@stammw stammw marked this pull request as ready for review August 4, 2020 14:32
@seanmonstar
Copy link
Member

Awesome, yes this is what I had in mind! So it looks like we can't require Rust 1.39 as the minimum version (I just picked that since that's currently in hyper). Do you know what version Quinn does require?

@stammw
Copy link
Contributor Author

stammw commented Aug 6, 2020

I don't know if there is a particular rust version target for quinn. h3 being a major addition for hyper, I guess It wouldn't take much to bump the supported rust version along with its integration. This is an ultra-easy transition for the users IMHO.

@seanmonstar
Copy link
Member

Yea I'm not super worried about needing a newer version, I just like to have it recorded in CI, so we know whenever it needs to change. We can update the value in CI in this PR to make it happy with Quinn.

Copy link
Member

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, let's just update the MSRV in CI to make it happy.

@stammw
Copy link
Contributor Author

stammw commented Aug 7, 2020

Okay, so 1.40 is enough.
I had to tweak the doc checks in the CI a bit.


use h3::quic;

struct QuinnConnection<S: Session> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be public, so that it can then be passed to h3::server::Connection::handshake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that should! Plus a new(quinn::Connection) function should be handy here. Thanks!

Copy link
Contributor

@jxs jxs Aug 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also NIT: since this is already under the quinn-h3 namespace, it could be named just Connection and then let the importer rename if conflicting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean QuinnConnection should be named Connection ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, and then if/when naming conflicts occur, you can import with use quinn_h3::Connection as QuinnConnection

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually a lot better, I thought I would need those prefixes, but no.

@stammw stammw force-pushed the quinn branch 2 times, most recently from 449f552 to aabf91a Compare August 7, 2020 14:33
@stammw
Copy link
Contributor Author

stammw commented Aug 7, 2020

So we're fine to merge? Should I squash the commits as the green github button suggests ?

@seanmonstar
Copy link
Member

Squash or rebase, if the commits make sense separated. If the commits are just addressing review feedback, then they should probably be squashed.

@stammw stammw merged commit 2d70d1f into master Aug 7, 2020
@stammw stammw deleted the quinn branch August 7, 2020 16:22
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.

3 participants