pub fn encode(packet_type: u32, body: &[u8]) -> Result<Vec<u8>, usize>
見出しを付けたパケット。全長が u32 に収まらなければ、本体の大きさを Err で返す
u32
Err