You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opens a bidirectional stream like quinn::connection:Connection.
let (send_stream, recv_stream) = connection.open_bi().await.unwrap();
And he should be able to read and write the exact number of bytes.
/// Read an exact number of bytes contiguously from the stream.
///
/// See [`read()`] for details. This operation is *not* cancel-safe.
///
/// [`read()`]: RecvStream::read
pub async fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), ReadExactError> {
ReadExact {
stream: self,
buf: ReadBuf::new(buf),
}
.await
}
/// Convenience method to write an entire buffer to the stream
///
/// This operation is *not* cancel-safe.
pub async fn write_all(&mut self, buf: &[u8]) -> Result<(), WriteError> {
WriteAll { stream: self, buf }.await
}
I noticed that h2::client::handshake seems to be able to read and write streams separately, but it cannot read or write the exact number of bytes, which is limited by the http2 window size.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Opens a bidirectional stream like quinn::connection:Connection.
And he should be able to read and write the exact number of bytes.
I noticed that
h2::client::handshakeseems to be able to read and write streams separately, but it cannot read or write the exact number of bytes, which is limited by the http2 window size.Beta Was this translation helpful? Give feedback.
All reactions