fn build_reply( buf: &mut [u8], msg: &ClientMsg, action: &Action, ) -> Option<usize>
Assemble a reply packet; returns the number of bytes used.