Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Websockets + TLS for Async-Std / Tokio #30

Merged
merged 9 commits into from
Jun 21, 2020
Merged

Conversation

gakonst
Copy link
Owner

@gakonst gakonst commented Jun 20, 2020

Motivation

We were missing websockets support.

Solution

The new websocket Provider does not care about what the internal value will be, as long as it's a Sink/Stream. We use a mutex since we need thread safe interior mutability.

We add convenience instantiation methods using async-tungstenite, for async-std and tokio. If required, we can further extend that in the future. The featrure flags are async-std-runtime and tokio-runtime.

We also add TLS Websocket support behind another feature flag, async-std-tls & tokio-tls. I personally found the integration slightly ugly, but couldn't come up with an alternative design other than conditional type aliases.

@gakonst gakonst merged commit 0cfeada into master Jun 21, 2020
@gakonst gakonst deleted the feature/websockets branch June 21, 2020 07:17
meetmangukiya pushed a commit to meetmangukiya/ethers-rs that referenced this pull request Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant