Giter Club home page Giter Club logo

Comments (2)

daniel-abramov avatar daniel-abramov commented on July 16, 2024

This won't help in our particular case as our underlying streams don't provide an implementation of vectored writes - this is caused by some known issues such as us relying solely on tungstenite-rs which was written under an assumption that streams implement Read + Write, instead of providing a sans-io implementation. But once we update the API surface of the tungstenite-rs, this would certainly be possible!

This is also one of the reasons why alternatives such as fastwebsockets are more performant.

from tokio-tungstenite.

agalakhov avatar agalakhov commented on July 16, 2024

This could indeed be implemented with future versions of Rust. One needs something like https://rust-lang.github.io/rfcs/1210-impl-specialization.html in order to switch between implementations for different streams. With that, one could implement a simple I/O for generic streams and scatter-gather I/O for less generic ones. With the current version of Rust it is however impossible to use the vectored feature of some advanced streams without losing the possibility to work with any stream that has Read+Write.

from tokio-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.