pub fn split_messages(buffer: &mut Vec<u8>) -> Vec<Vec<u8>>
Split what has been read into whole messages, keeping the unfinished tail.