Comments (7)
The return type of connect_async
should be WebSocketStream<AutoStream<TokioAdapter<TcpStream>>>
, not sure why rustdoc doesn't show that correctly.
How is this simpler in tokio-tungstenite
, should be more or less the same type apart from the TokioAdapter
or not?
from async-tungstenite.
not sure why rustdoc doesn't show that correctly.
The problem seems to be that at least AutoStream
is private to the crate. See line 93 and 103 of async_tungstenite/tokio.rs
.
In tokio-tungstenite
it seems to be WebSocketStream<TcpStream>
.
from async-tungstenite.
In any case, having public type aliases for these things would be good :) Do you want to provide a PR for that?
from async-tungstenite.
To be honest, I don't even know how I would create the type aliases. When I tried before, I failed (as I wrote, I'm pretty new to Rust :)).
from async-tungstenite.
Ok, I'll add something :)
from async-tungstenite.
This is done now and part of the 0.7.0 release. I've also made things generally simpler for tokio users.
Maybe you want to give it a try again and let me know if there's something else confusing/difficult for you? Thanks!
from async-tungstenite.
Awesome! :)
At the moment I'm refactoring/extending my code and it doesn't compile. After it compiles again, I will give async-tungstenite
again a try.
from async-tungstenite.
Related Issues (20)
- Inspecting the steam buffer HOT 3
- "thread 'async-std/runtime' panicked" when running "echo-server" example HOT 1
- Support fragmented messages HOT 3
- How to close connection gracefully after WebSocketStream.split()? HOT 2
- [Question]: How to optimise the memory usage for websocket client HOT 5
- could not find `async_std` in `async_tungstenite` HOT 6
- Support for the `smol` runtime HOT 1
- TLS Features are not additive HOT 6
- Update to tungstenite 0.13? HOT 1
- [Question] Cancellation of read from websocket stream before completion HOT 2
- async_tungstenite::tokio::ConnectStream doesn't implement Debug when feature "tokio-native-tls" is enabled. HOT 5
- [Question] How to add headers to connection? HOT 3
- max connect just 50 onely HOT 2
- How to add TLS support to a websocket server for wss to work? HOT 2
- Disable certificate validation HOT 2
- How to disable logging for compact? HOT 5
- Avoid webpki-roots as a default dependency when tokio-rustls is used HOT 5
- Is it possible to flush all buffered messages before closing the stream? HOT 5
- Cloning `WebSocketStream`s HOT 1
- Initial report: stack overflow on windows with 0.15 HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from async-tungstenite.