I think that your deduction is correct. This is the experience I have with 
ClientReader, once it fails Read(), the stream needs to be terminated as it 
won't recover.
There is perhaps a way to get some server information with the 
<ClientWriter>WaitForInitialMetadata(), but otherwise, protocol negotiation 
would need to occur before the stream get established.
On Monday, December 20, 2021 at 5:30:16 PM UTC-5 Roman Andronov wrote:

> Thank you - could you please clarify why would I want to call the 
> <ClientWriter>Finish() function? That will surely end this streaming 
> conversation. Will it not? I mean, what if the client is ready to not close 
> this conversation depending on what the server says: if the server says 
> "please adjust the version number of your messages and I will happily 
> proceed" or some such then the client can adjust on the fly and move on, 
> all without closing the stream.
>
> Am I correct in deducing from what you are saying that *the only* way for 
> a streaming client to find out why the Write() call failed is to close this 
> streaming conversation?
>
>
> On Monday, December 20, 2021 at 4:29:23 PM UTC-5 [email protected] 
> wrote:
>
>>
>> Have you tried calling <ClientWriter>Finish() to get the gRPC Status 
>> after Write() returned false?
>>
>> On Monday, December 20, 2021 at 11:10:03 AM UTC-5 Roman Andronov wrote:
>>
>>> C++ only: what is the way to extract the needed error code and the 
>>> corresponding error string from the GRPC library when the <ClientWriter> 
>>> Write() call fails?
>>>
>>> The <ClientWriter> Write() call returns a useless Boolean True/False 
>>> value.
>>>
>>> That Write() call fails - how can the error code, the corresponding 
>>> error string and the overall Status of the respective Server-side call be 
>>> retrieved (if, say, it is known that the Server-side code that participates 
>>> in this Client streaming call fails)?
>>>
>>> Thank  you in advance.
>>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/ee581cda-d0fe-4174-83c7-1d1f3ae85ae2n%40googlegroups.com.

Reply via email to