Giter Club home page Giter Club logo

Comments (4)

daniel-abramov avatar daniel-abramov commented on September 17, 2024 1

We will definitely implement this eventually, we require these things for our product, but at the moment they are not in a priority as we have many other tasks to do, unfortunately neither I nor Alexey had time to add this support, but it should not be a complex thing, we just have to find some time to add this and fix several relevant issues (you might have noticed that all these things are already implemented internally in tungstenite-rs, we just need to update and extend the public interfaces of some modules).

from tokio-tungstenite.

agalakhov avatar agalakhov commented on September 17, 2024

There is support for user pings in core Tungstenite, it is just not wrapped for Tokio. To be done.

from tokio-tungstenite.

daniel-abramov avatar daniel-abramov commented on September 17, 2024

Yeah, it's a good question how to make this implementation and stay compatible with the Stream requirements. When you split the WebSocketStream into 2 halves: Stream (incoming messages) and Sink (outcoming messages), each of them is a stream of Messages. Thus we can push messages to the sink and retrieve messages from the sink.

One of the simpliest solutions which comes to my mind is to add an additional function to the Message, something like Message::control(...) or Message::ping(...), in this case you can send it to the sink like any other message, so it's very simple and does not even require changes in the user's code. By the way, this would also solve #4.

from tokio-tungstenite.

bbigras avatar bbigras commented on September 17, 2024

Any plans to implement this soon? I think it's an important feature to have reliable web sockets.

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.