Hi,

The below may be useful.

Check channel.GetState() method to check the latest state of channel.

https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md

Check below method as well but it is blocking call.

bool WaitForStateChange(grpc_connectivity_state source_state,
gpr_timespec deadline);


On Tue, Apr 9, 2019 at 5:26 AM 'Rohan Chawhan' via grpc.io <
[email protected]> wrote:

> Hi all, I want to display a "user defined error" whenever the
> client-server connection is lost. I reached this
> <https://grpc.io/blog/a_short_introduction_to_channelz>blog where a
> similar issue is shown by printing log. I want to first include this
> minimum functionality in my client to get notified as soon as the
> client-to-server connection is broken/unreachable (due to any possible
> reason).
>
> I could not find any informative resource on this topic for C++. can
> someone help to handle this connection lost scenario?
>
> *Matrix Comsec Pvt. Ltd.*
> #394, GIDC Makarpura - 390010. Dist: Vadodara, Gujarat, India
> [image: Matrix Telecom | Security] <http://bit.ly/comsec-esignature>
> IP Video Surveillance |  <http://bit.ly/IPVS-esginature>People Mobility
> Management |  <http://bit.ly/cosec-esignature>Unified Communications
> <http://bit.ly/telecom-esignature>
> 1 Million+ Customers | 2,500+ Partners | 60+ Products | 50+ Countries
> *We put more in the box, so your business can think more out of the box.*
> [image: Facebook] <https://www.facebook.com/matrixcomsec> [image:
> linkedin] <http://www.linkedin.com/in/matrixcomsec> [image: twitter]
> <https://twitter.com/Matrix_ComSec>
> <https://www.linkedin.com/company/matrix-telecom-solutions/> [image:
> youtube] <https://www.youtube.com/user/MatrixComSec>
>
> --
> 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 post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/fd541245-eccb-4b59-a8e9-c3638fdad4c1%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/fd541245-eccb-4b59-a8e9-c3638fdad4c1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Thanks,
Sidhartha Thota.

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CALguN-GHSw7wCytKyhACTr%2Bmdg3ZuSsLn-pCcgi%3DiS5d4Hd0Cw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to