Commit 9b91e8ce authored by Kenton Varda's avatar Kenton Varda

Tweak EZ RPC ReaderOptions docs.

parent 202232b3
...@@ -104,9 +104,12 @@ public: ...@@ -104,9 +104,12 @@ public:
// The address is parsed by `kj::Network` in `kj/async-io.h`. See that interface for more info // The address is parsed by `kj::Network` in `kj/async-io.h`. See that interface for more info
// on the address format, but basically it's what you'd expect. // on the address format, but basically it's what you'd expect.
// //
// `readerOpts` is the ReaderOptions structure used by capnproto to limit the traversal of // `readerOpts` is the ReaderOptions structure used to read each incoming message on the
// messages. If not specified, a default value of 8M max word traversal and a nesting limit of 64 // connection. Setting this may be necessary if you need to receive very large individual
// deep. // messages or messages. However, it is recommended that you instead think about how to change
// your protocol to send large data blobs in multiple small chunks -- this is much better for
// both security and performance. See `ReaderOptions` in `message.h` for more details.
// You should only need to set this if you are receiving errors about messages being too large or // You should only need to set this if you are receiving errors about messages being too large or
// too deep in normal operation, and should consider restructuring your protocol to use simpler // too deep in normal operation, and should consider restructuring your protocol to use simpler
// or smaller messages if this is an issue for you. // or smaller messages if this is an issue for you.
...@@ -166,12 +169,11 @@ public: ...@@ -166,12 +169,11 @@ public:
// resolved. If you need to wait until the server is definitely up, wait on the promise returned // resolved. If you need to wait until the server is definitely up, wait on the promise returned
// by `getPort()`. // by `getPort()`.
// //
// `readerOpts` is the ReaderOptions structure used by capnproto to limit the traversal of // `readerOpts` is the ReaderOptions structure used to read each incoming message on the
// messages. If not specified, a default value of 8M max word traversal and a nesting limit of 64 // connection. Setting this may be necessary if you need to receive very large individual
// deep. // messages or messages. However, it is recommended that you instead think about how to change
// You should only need to set this if you are receiving errors about messages being too large or // your protocol to send large data blobs in multiple small chunks -- this is much better for
// too deep in normal operation, and should consider restructuring your protocol to use simpler // both security and performance. See `ReaderOptions` in `message.h` for more details.
// or smaller messages if this is an issue for you.
EzRpcServer(struct sockaddr* bindAddress, uint addrSize, EzRpcServer(struct sockaddr* bindAddress, uint addrSize,
ReaderOptions readerOpts = ReaderOptions()); ReaderOptions readerOpts = ReaderOptions());
......
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