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.