grpc / grpc-dart

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

Track some specific request using ClientCall #700

Open VolodiaHunkalo opened 2 months ago

VolodiaHunkalo commented 2 months ago

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

mosuem commented 2 weeks ago

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

VolodiaHunkalo commented 1 week 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