mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-08-03 14:48:17 +00:00
feat: add new_from_leftover
on Framed
This commit is contained in:
parent
f834305563
commit
40740169e0
2 changed files with 10 additions and 5 deletions
|
@ -66,9 +66,13 @@ where
|
|||
S: StreamWrapper,
|
||||
{
|
||||
pub fn new(stream: S::InnerStream) -> Self {
|
||||
Self::new_with_leftover(stream, BytesMut::new())
|
||||
}
|
||||
|
||||
pub fn new_with_leftover(stream: S::InnerStream, leftover: BytesMut) -> Self {
|
||||
Self {
|
||||
stream: S::from_inner(stream),
|
||||
buf: BytesMut::new(),
|
||||
buf: leftover,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue