Skip to content

Commit

Permalink
Client also needs an ability to stop streams with error code (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslavros authored Jan 14, 2025
1 parent dbf2523 commit e53e16e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions h3/src/client/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,13 @@ where
self.inner.send_data(buf).await
}

/// Stop a stream with an error code
///
/// The code can be [`Code::H3_NO_ERROR`].
pub fn stop_stream(&mut self, error_code: Code) {
self.inner.stop_stream(error_code);
}

/// Send a set of trailers to end the request.
///
/// [`RequestStream::finish()`] must be called to finalize a request.
Expand Down

0 comments on commit e53e16e

Please sign in to comment.