grpc / grpc-dart

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

Expose onConnectionStateChanged for channels #565

Closed Cobinja closed 2 years ago

Cobinja commented 2 years ago

This offers a Stream on channels. Only for Http2Channel, not for web usage.

Usage: clientChannel.onConnectionStateChanged.listen(...)

This is an alternative to #563. Only merge one of these.

linux-foundation-easycla[bot] commented 2 years ago

CLA Signed

The committers listed above are authorized under a signed CLA.

mraleph commented 2 years ago

Thanks @Cobinja. I think this is good to go. I have refactored things a bit more (you introduced the field I asked for - but did not actually make use of it to share repeating code). You can take a look at the final version.

Cobinja commented 2 years ago

My thought process was "Web channels might need a completely different implementation, so just provide the common API". I'm fine with your changes.

andreadaoud commented 2 years ago

Hi,

Just a ping on this PR. What's blocking this from being merged?

natebosch commented 1 year ago

This was a breaking change - there are internal implementations of ClientConnection which are broken because they no longer implement the entire interface.