No, you need to call write to notice if it's closed.

On Thursday, September 17, 2020 at 9:02:47 PM UTC-7 [email protected] 
wrote:

> Hi all,
>
> I have a GRPC streaming API in C++ that streams from the client to the 
> server.
>
> rpc TransferResultChunk(stream TransferResultChunkRequest) returns 
> (TransferResultChunkResponse) {}
>
> The server may cancel the context and close the stream at any time. Is 
> there a way for the client to detect that this has occurred without writing 
> to the stream? I was thinking there would be something like IsCancelled() 
> like grpc::ServerContext has in grpc::ClientContext, but it doesn't seem to 
> exist.
>
> It does seem to be possible in Golang, so I thought I would see if I was 
> missing something on the C++ side.
>
> Thanks a lot,
> Natalie
>

-- 
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/f25b59ca-5e1e-43e9-9eae-cb2db5027864n%40googlegroups.com.

Reply via email to