Giter Club home page Giter Club logo

Comments (7)

sdroege avatar sdroege commented on August 23, 2024

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.

d4h0 avatar d4h0 commented on August 23, 2024

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.

sdroege avatar sdroege commented on August 23, 2024

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.

d4h0 avatar d4h0 commented on August 23, 2024

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.

sdroege avatar sdroege commented on August 23, 2024

Ok, I'll add something :)

from async-tungstenite.

sdroege avatar sdroege commented on August 23, 2024

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.

d4h0 avatar d4h0 commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.