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

QUIC API: Consider passing QuicConnectionOptions to Quic.Connection.ConnectAsync #56009

Closed
geoffkizer opened this issue Jul 20, 2021 · 3 comments
Assignees
Labels
api-needs-work API needs work before it is approved, it is NOT ready for implementation area-System.Net.Quic
Milestone

Comments

@geoffkizer
Copy link
Contributor

We have a somewhat awkward API pattern today, where you pass the QuicConnectionOptions object to to QuicConnection constructor, but we don't actually use it until you do ConnectAsync. One minor inconvenience of this is that we have to store the QuicConnectionOptions object for this brief period of time when we don't use it any other time.

We should consider passing these options into ConnectAsync instead, to simplify the model and implementation here.

@geoffkizer geoffkizer added this to the 7.0.0 milestone Jul 20, 2021
@ghost
Copy link

ghost commented Jul 20, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

We have a somewhat awkward API pattern today, where you pass the QuicConnectionOptions object to to QuicConnection constructor, but we don't actually use it until you do ConnectAsync. One minor inconvenience of this is that we have to store the QuicConnectionOptions object for this brief period of time when we don't use it any other time.

We should consider passing these options into ConnectAsync instead, to simplify the model and implementation here.

Author: geoffkizer
Assignees: -
Labels:

area-System.Net.Quic

Milestone: 7.0.0

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jul 20, 2021
@karelz karelz added enhancement Product code improvement that does NOT require public API changes/additions and removed untriaged New issue has not been triaged by the area owner labels Jul 20, 2021
@karelz karelz added api-needs-work API needs work before it is approved, it is NOT ready for implementation and removed enhancement Product code improvement that does NOT require public API changes/additions labels Nov 16, 2021
@ManickaP
Copy link
Member

Moreover, as @scalablecory mentioned in our discussion, we shouldn't create QuicConnection via constructor since that would prevent us from making the class abstract in the future - if we decide to provide the abstraction. Instead, we could have a static method QuicConnection QuicConnection.ConnectAsync(QuicConnectionOptions options) to construct and connect the connection in one go.

@ManickaP
Copy link
Member

Closing as covered by #68902 and #70424

@ghost ghost locked as resolved and limited conversation to collaborators Jul 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-needs-work API needs work before it is approved, it is NOT ready for implementation area-System.Net.Quic
Projects
None yet
Development

No branches or pull requests

3 participants