tor-proto: Add a constructor for IncomingStream.
This commit is contained in:
parent
dc0b904492
commit
4133a9464e
|
@ -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!()
|
||||
|
|
Loading…
Reference in New Issue