思考题可以参考 dva 同学的实现,我这里也提供一个关于 client 的修改:
```rust
use anyhow::Result;
use bytes::Bytes;
use futures::prelude::*;
use kv::CommandRequest;
use prost::Message;
use tokio::net::TcpStream;
use tokio_util::codec::{Framed, LengthDelimitedCodec};
use tracing::info;
#[tokio::main]
async fn main() -> Result<()> {
tracing_subscriber::fmt().init();
let addr = "127.0.0.1:9527";
let stream = TcpStream::connect(addr).await?;
let mut client = Framed::new(stream, LengthDelimitedCodec::new());
let cmd = CommandRequest::new_hset("table1", "hello", "world".into());
client.send(Bytes::from(cmd.encode_to_vec())).await?;
if let Some(Ok(data)) = client.next().await {
info!("Got response: {:?}", data);
}
Ok(())
}
```