grpc / grpc-dart

The Dart language implementation of gRPC.
https://pub.dev/packages/grpc
Apache License 2.0
860 stars 271 forks source link

Track some specific request using ClientCall #700

Open vhunkalo opened 7 months ago

vhunkalo commented 7 months ago

Is it possible to track some specific request? I have grpc stream and I need to track onReady, onClosed etc.

mosuem commented 5 months ago

Could you elaborate on the motivation of this, and provide some code example?

vhunkalo commented 5 months ago

@mosuem if i have bi-directional stream, how could i know that stream is alive and i could send requests. Furthermore, in terms of battery saving for example for messing apps - stream will be forcefully closed and need to be reconnected. Also switching from Wi-Fi to cellular cause connection close which is not seen in errors etc but stream is dead

So that's the use cases where it's essential to track this specific call status or have listener to make health check

vhunkalo commented 4 months ago

@mosuem any answers regarding re-connection/health checking ?