fn write_cstr(buf: &mut BytesMut, s: &[u8]) -> Result<()>
Safe write of s into buf as cstring (String in the protocol).