quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.57k stars 364 forks source link

Expose poll_write & poll_close #1782

Closed jean-airoldie closed 3 months ago

jean-airoldie commented 3 months ago

Since SendStream methods no longer return a named future, the only current way of doing polling is via futures_io::AsyncWrite or tokio::io::AsyncWrite. I would like to be able to call poll_write and poll_close without any of these libraries features and without needing to use a std::io::Error which can be undesirable.

jean-airoldie commented 3 months ago

The same logic applies to RecvStream, where polling is only possible via AsyncRead methods which are undesirable because of the std::io::Error, as well as poll_read_chunk which is simply not accessible.