Commit a26f5885 authored by Kenton Varda's avatar Kenton Varda

Fix docs for makeRpcClient()

parent 2403cd5e
...@@ -74,10 +74,11 @@ RpcSystem<SturdyRefHostId> makeRpcServer( ...@@ -74,10 +74,11 @@ RpcSystem<SturdyRefHostId> makeRpcServer(
// Make an RPC server. Typical usage (e.g. in a main() function): // Make an RPC server. Typical usage (e.g. in a main() function):
// //
// MyEventLoop eventLoop; // MyEventLoop eventLoop;
// kj::WaitScope waitScope(eventLoop);
// MyNetwork network; // MyNetwork network;
// MyRestorer restorer; // MyRestorer restorer;
// auto server = makeRpcServer(network, restorer); // auto server = makeRpcServer(network, restorer);
// kj::NEVER_DONE.wait(); // run forever // kj::NEVER_DONE.wait(waitScope); // run forever
// //
// See also ez-rpc.h, which has simpler instructions for the common case of a two-party // See also ez-rpc.h, which has simpler instructions for the common case of a two-party
// client-server RPC connection. // client-server RPC connection.
...@@ -89,11 +90,11 @@ RpcSystem<SturdyRefHostId> makeRpcClient( ...@@ -89,11 +90,11 @@ RpcSystem<SturdyRefHostId> makeRpcClient(
// Make an RPC client. Typical usage (e.g. in a main() function): // Make an RPC client. Typical usage (e.g. in a main() function):
// //
// MyEventLoop eventLoop; // MyEventLoop eventLoop;
// kj::WaitScope waitScope(eventLoop);
// MyNetwork network; // MyNetwork network;
// MyRestorer restorer; // auto client = makeRpcClient(network);
// auto client = makeRpcClient(network, restorer);
// MyCapability::Client cap = client.restore(hostId, objId).castAs<MyCapability>(); // MyCapability::Client cap = client.restore(hostId, objId).castAs<MyCapability>();
// auto response = cap.fooRequest().send().wait(); // auto response = cap.fooRequest().send().wait(waitScope);
// handleMyResponse(response); // handleMyResponse(response);
// //
// See also ez-rpc.h, which has simpler instructions for the common case of a two-party // See also ez-rpc.h, which has simpler instructions for the common case of a two-party
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment