-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add ws/robust, an alternative to ws_manager #49
base: master
Are you sure you want to change the base?
Conversation
This is my first time writing a Rust lib. Any feedback would be welcome! I'll be testing the lib myself in the coming weeks and expect lots of changes based on that, hence leaving this PR as a draft. |
cfe3a0b
to
3e27c2c
Compare
This alternative to ws_manager with some improvements: - The stream is not coupled to the InfoClient - Subscriptions management is separated from the stream - Subscriptions are dropped when the token is dropped - The stream can be closed and does not leave dangling futures It does not implement connection retries since this should be built on top as it requires informing subscribers that the stream is interrupted and the client is missing messages.
5d00e38
to
efbe051
Compare
@abrkn What's the status of this pull request? It's still marked as a draft but is it ready for review? |
i've been using the code in production for some time and i'm very happy with it. i'll do some rebasing and mark it ready for review. if the changes are too drastic, an alternate approach is exposing the types of this crate as |
@abrkn can't you expose the additional features via a crate feature? I can assist in this effort if you want. Essentially create a "enhanced-ws" or a similar feature name for all the new changes. This way you can modify existing functionality(building on this sdk) and add your own functionality. |
This alternative to ws_manager with some improvements:
It does not implement connection retries since this should be built on top as it requires informing subscribers that the stream is interrupted and the client is missing messages.
TODO
Subs
to create aStream
andSubs
with one fn call