Issuing RPCs
In this part, you will send requests to your server by invoking RPCs from the client.
Currently, src/client.rs contains an example function for sending an Example RPC. In a similar manner, implement the echo function to first connect to the server, then send an ECHO RPC.
To retrieve an
EchoReplyfrom aResponse<EchoReply>, you may find theinto_innerfunction useful. You may want to take a look at how theexamplefunction recovers anExampleReplyfrom aResponse<ExampleReply>.
You should now be able to run ./target/debug/client echo test and get an output of test. Make sure you compile your code with cargo b and that your server is running first.