mirror of
https://github.com/fafhrd91/actix-net
synced 2025-02-20 05:20:32 +01:00
add FramedParts::with_read_buf method
This commit is contained in:
parent
51bd7d2721
commit
b407c65f4c
@ -1,5 +1,10 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [0.1.0] - 2019-03-06
|
||||||
|
|
||||||
|
* Added `FramedParts::with_read_buffer()` method.
|
||||||
|
|
||||||
|
|
||||||
## [0.1.0] - 2018-12-09
|
## [0.1.0] - 2018-12-09
|
||||||
|
|
||||||
* Move codec to separate crate
|
* Move codec to separate crate
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-codec"
|
name = "actix-codec"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Utilities for encoding and decoding frames"
|
description = "Utilities for encoding and decoding frames"
|
||||||
keywords = ["network", "framework", "async", "futures"]
|
keywords = ["network", "framework", "async", "futures"]
|
||||||
|
@ -349,4 +349,17 @@ impl<T, U> FramedParts<T, U> {
|
|||||||
_priv: (),
|
_priv: (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Create a new `FramedParts` with read buffer
|
||||||
|
pub fn with_read_buf(io: T, codec: U, read_buf: BytesMut) -> FramedParts<T, U> {
|
||||||
|
FramedParts {
|
||||||
|
io,
|
||||||
|
codec,
|
||||||
|
read_buf,
|
||||||
|
write_buf: BytesMut::new(),
|
||||||
|
write_buf_lw: LW,
|
||||||
|
write_buf_hw: HW,
|
||||||
|
_priv: (),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user