rpc::no_wait is too "no_wait" currently. When client sends a no_wait
message it immediately gets ready future in return, so client cannot
know when data is actually sent and can be discarded. This patch fixes
this by returning a future that will become ready when data is no longer
needed.
Client connection may outlive its do_until() loop. Make connection
point shared to overcome this. If connection dies while async handler
is running it will not be deleted until the handler is executed.
If rpc handler needs locally held information about rpc client that
making a call it may have client_info as a first parameter of rpc
handler. Rpc framework will pass it to the callback during invocation.
To register rpc handler func(param1, param2, param3) both server and client
auto remote_func = myrpc.register_handler(id, func);
This call will return another function that client can use to invoke RPC
calls like this:
remote_func(client, param1, param2, param3);
This call will return future<> with func() result.