Skip to main content

encode

Function encode 

pub fn encode(kind: u8, body: &[u8], out: &mut Vec<u8>)
Expand description

Appends one frame. body is at most MAX_FRAME bytes: the peer’s decoder refuses a longer one (and its length would not fit the header past 4 GiB), so whoever builds bodies from a backlog bounds them.