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

Is there a reason to have separate client and server endpoints? #170

Open
MOZGIII opened this issue Apr 21, 2024 · 4 comments
Open

Is there a reason to have separate client and server endpoints? #170

MOZGIII opened this issue Apr 21, 2024 · 4 comments
Labels
question Further information is requested

Comments

@MOZGIII
Copy link
Contributor

MOZGIII commented Apr 21, 2024

I feel like I am missing something, but I don't see a reason why there is a need to have incompatible types for the endpoints.

With QUIC in general and quinn in particular it is totally fine to issue a connect from an endpoint that is also accepting connections. Why isn't it allowed in wtransport?

@BiagioFesta BiagioFesta added the question Further information is requested label Apr 25, 2024
@BiagioFesta
Copy link
Owner

Merely design choice: to have a more user-friendly API interface.

Users might find confusing to have same endpoint working both server and client, in particular considering two different incompatible type for configuration are anyway required.

quinn panics/returns error when Endpoint is used without providing the proper configuration type before, introducing a mutable state (which might leads inconsistent program states).

Considering (from my point of view) having overlapping Endpoint does not bring enough benefits comparing to the possible bad design, I preferred to have this stateless, less error-prone design.

@MOZGIII
Copy link
Contributor Author

MOZGIII commented Apr 25, 2024

Well, this design is denying a use case that could be very much useful. Any chance you'll enable it somehow?

@BiagioFesta
Copy link
Owner

BiagioFesta commented Apr 25, 2024

As said, from my experience, I don't see any useful use case, compared to the disadvantages.

You say "very useful use case", please describe it, in order to make me understand if the trade-off is worth it

@MOZGIII
Copy link
Contributor Author

MOZGIII commented Apr 25, 2024

NAT hole-punching basically, for client-to-client connections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants