Skip to content

rpc客户端/服务端加入流式调用 #7

Description

@RFoe

template <typename R, typename... Args>
COASYNC_ATTRIBUTE((nodiscard))
awaitable<R> call(std::string const& __fn, Args&& ... __args)

或许是这样

net::serde_stream reply = client.call_streaming("get_bytes", 5);
for(unsigned int i {}; i < 5; i ++) {
    std::printf("%c\n", co_await reply.get<char>());
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions