Change Connection traits to return futures
Hi,
i experimented a bit with quinn 0.9 from #145 and GATs in the Quic Connection trait.
I changed the trait and implemented it for quinn. And i refactored the h3 implementation to use the new trait.
Of curse this is not finished yet. There are still some failing tests, I removed some code parts that need some refactoring and documentation is missing. But the examples mostly work.
The disadvantages of this:
- Breaks MSRV
- Changes the Traits
- Some other disadvantages I didn't think of?
Advantages:
- No Boxing required for the connection trait.
- Less Poll methods and because of that a simpler code base.
- Maybe some other advantages I didn't think of?
Open Questions:
- Do we need a driver for server like the client have one to manage the control and qpack streams?
- Should we change other traits to return futures as well?
I wanted to ask for your opinion before I continue to work in this. Is this the direction this project should go?
@seanmonstar @eagr what do you think?
Polling data from the control stream when accepting a new request like before didn\´t work well with the async methods. So I separated the accept logic so one task can manage the control stream while the other is accepting requests. The client is already doing a similar thing.
This fixed some tests. But there is still a lot of work to do.