tor-proto: Add a constructor for IncomingStream.

This commit is contained in:
Gabriela Moldovan 2023-07-28 13:43:28 +01:00
parent dc0b904492
commit 4133a9464e
No known key found for this signature in database
GPG Key ID: 3946E0ADE72BAC99
1 changed files with 13 additions and 0 deletions

View File

@ -40,6 +40,19 @@ pub enum IncomingStreamRequest {
}
impl IncomingStream {
/// Create a new `IncomingStream`.
pub(crate) fn new(
request: IncomingStreamRequest,
stream: StreamTarget,
reader: StreamReader,
) -> Self {
Self {
request,
stream,
reader,
}
}
/// Return the underlying message that was used to try to begin this stream.
pub fn request(&self) -> IncomingStreamRequest {
todo!()