Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose onStateChanged from Http2ClientConnection #428

Closed
long1eu opened this issue Jan 24, 2021 · 7 comments
Closed

Expose onStateChanged from Http2ClientConnection #428

long1eu opened this issue Jan 24, 2021 · 7 comments

Comments

@long1eu
Copy link

long1eu commented Jan 24, 2021

Right now this field is marked as visibleForTesting. But it would be awesome to monitor the state of the stream and even expose a Stream<ConnectionState>.

@mathisfouques
Copy link

Up, why is this only visible for testing ?

@shekohex
Copy link

Yes, please!
one use case is when the connection is restored we can dequeue the failed/pending requests and send them again.

@Cobinja
Copy link
Contributor

Cobinja commented May 9, 2022

This would be great to have on the channel, similar to how it's done in the python implementation (https://github.com/grpc/grpc/blob/master/src/python/grpcio/grpc/_channel.py#L1493).

@Ludonope
Copy link

Any update on that?

It seems pretty essential to be able to know the state of the current connection.
I'm using gRPC for a Flutter app and being able to show the current connection state to the user is an important feature.

@micheljung
Copy link

Looks like this has been fixed with #565 (3.1.0).

@mraleph mraleph closed this as completed Apr 11, 2023
@zs-dima
Copy link

zs-dima commented Apr 11, 2023

@mraleph @micheljung @Cobinja
Thanks a lot,

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

Could be nice to add comment about Web at least, as onConnectionStateChanged property available for all platforms currently.
And maybe create issue to implement it it for Web in future.

@mraleph
Copy link
Member

mraleph commented Apr 12, 2023

Could be nice to add comment about Web at least, as onConnectionStateChanged property available for all platforms currently.

It is documented on the property itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants