Base: codex-main originale (prima del fork aKode)
This commit is contained in:
13
codex-rs/plugin-host/src/framing.rs
Normal file
13
codex-rs/plugin-host/src/framing.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
//! Shared wire-format configuration for both ends of the plugin pipes.
|
||||
|
||||
use tokio_util::codec::LengthDelimitedCodec;
|
||||
|
||||
pub const MAX_FRAME: usize = 1024 * 1024;
|
||||
|
||||
pub fn codec() -> LengthDelimitedCodec {
|
||||
LengthDelimitedCodec::builder()
|
||||
.little_endian()
|
||||
.length_field_length(/*val*/ 4)
|
||||
.max_frame_length(MAX_FRAME)
|
||||
.new_codec()
|
||||
}
|
||||
Reference in New Issue
Block a user