1

我需要使用超过默认消息遍历限制的 Rust Cap'n Proto API 发送 RPC。当我尝试发送消息时,我收到以下错误:

remote exception: <class \'capnp.lib.capnp.KjException
\'>:capnp/arena.c++:130: failed: Exceeded message traversal limit.
See capnp::ReaderOptions.

如果我正在使用 阅读消息capnp::serialize::read_message,我可以提供一个ReaderOptions指定新遍历限制的结构。

但是,我正在发出和发送计算器示例中的请求,而不是直接阅读消息。如何设置请求消息的遍历限制?

4

1 回答 1

1

您可以在构造时设置它VatNetwork

pub fn new<U>(
    input_stream: T,
    output_stream: U,
    side: Side,
    receive_options: ReaderOptions,
) -> VatNetwork<T>
where
    U: Write + 'static,

https://github.com/capnproto/capnproto-rust/issues/124#issuecomment-468877758

于 2019-03-02T03:19:49.673 回答