Skip to content

Question: is it possible to implement a server to client request, using a bidirectional-streaming channel and exposed as a standard C++ class/interface? #13

@OleStauning

Description

@OleStauning

Hi,

Thank you for writing this library.

I'm currently trying trying to use asio-grpc for implementing a service that, as a part of a request, can call back to a connected client to get additional data - dependency injection style. This dependency injection channel is a long-living bidirectional streaming grpc call. My problem is that the server-logic is calling into a normal pure virtual class (interface) for requesting these values. AFAIK this rules out using co_await, co_return since this would imply my interface should return a coroutine. So I'm trying to figure out if I can implement such interface by using co_yield, where the consumer of the values does not need to be a coroutine.

The server-logic is being triggered by another async grpc call, but the server-logic itself is not async.

I hope someone is able to help me to figure out if and how this is possible. Let me know if my description is not clear enough.

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions