Hi Zhanhui,
Just in case, please read through the callback API spec to refamiliarize
yourself:
https://github.com/grpc/proposal/blob/master/L67-cpp-callback-api.md
Note that you can only have one outstanding read or write at a time. If you
are calling StartWrite while a previous write's OnWriteDone method has not
yet been called, that's improper use of the API (and effectively undefined
behavior).
I hope this helps!
Best,
-aj
On Monday, March 18, 2024 at 7:52:40 PM UTC-7 Zhanhui Li wrote:
> Hi gRPC C/C++ community,
>
> I am building C/C++ client for an opensource project using gRPC and we
> have a bidirectional stream API.
>
> For the client side implementation, we need to create a class, inherting
> from ClientBidiRecator, overriding some methods.
>
> Note the OnXXDone methods has parameter "bool ok", requiring "If false,
> no new read/write operation will succeed, and any further Start* should
> not be called."
>
> The problem is, Start{Read, Write} call could be concurrent with the
> OnXxxDone one.
> What would the consequences be if Start* called after On*Done with ok
> being false? Is there a way to walkaround this?
>
> Best Regards!
>
> Zhanhui Li
>
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/e0c7cbdb-b602-44b9-be6f-ade86a8c11adn%40googlegroups.com.