gRPC Cancellation Token

46 views
Skip to first unread message

Ahmet Yılmaz

unread,
Sep 22, 2023, 4:12:55 AM9/22/23
to grpc.io
Hello Everyone,

Im working grpc server client project on c++, Im trying to cancel server rpc with a request from client, but I didn't    How can I cancel server rpc  from client side ? 

Thanks 
Best regards

Sanjay Pujare

unread,
Sep 22, 2023, 6:49:54 PM9/22/23
to Ahmet Yılmaz, grpc.io
Use context.TryCancel() as described in https://github.com/grpc/grpc/issues/17292

--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/e3bcdccf-45b5-4166-bfff-d0a786b1824fn%40googlegroups.com.

Ahmet Yılmaz

unread,
Sep 25, 2023, 11:21:09 AM9/25/23
to grpc.io
hello again,
What I'm really curious about is that when I use the context.IsCanceled() method in the asynchronous server stream application to receive the cancel request on the server side, not the TryCancel method, the program terminates with a segmentation fault error. If I need to give more details, I write in C# on the client side, and on the server side, I can send a cancellation token from the client in C++, but I could not find an example code or implementation of this in C++, can you help me on how to do it on the server?
thanks best regards. 
Reply all
Reply to author
Forward
0 new messages