KL233X4WYJGANJNK2Y5SLLSLRG7LVBP2MZMX4ALIBPQCVPJAZZ4AC
let ok_buf = {
let resp = Response {
status: Status::Ok as i32,
counter: 0,
err_msg: "".to_string(),
};
let len = resp.encoded_len();
let mut out_buf = vec![0u8; 4 + len].into_boxed_slice();
out_buf[..4].copy_from_slice(&(len as u32).to_be_bytes());
resp.encode(&mut &mut out_buf[4..]).unwrap();
out_buf
};
let resp = Response {
status: Status::Ok as i32,
counter: 0,
err_msg: "".to_string(),
};
let len = resp.encoded_len();
let mut out_buf = vec![0u8; 4 + len].into_boxed_slice();
out_buf[..4].copy_from_slice(&(len as u32).to_be_bytes());
resp.encode(&mut &mut out_buf[4..]).unwrap();
if stream.write_all(&out_buf).await.is_err() { return; };
if stream.write_all(&ok_buf).await.is_err() { return; };