Giter VIP home page Giter VIP logo

Comments (4)

lpinca avatar lpinca commented on May 27, 2024

It is technically possible but it's not trivial because the Primus client is designed to talk to a Primus server. You basically have to rebuild:

  • The message protocol
  • The serialization format
  • The plugin system
  • Something I can't think of at the moment

on the server.

I think it will be easier to use a pure WebSocket client.

from primus.

mark-hahn avatar mark-hahn commented on May 27, 2024

Thanks, even though I don't like the answer :-) I was hoping to avoid writing my own persistent session code. I don't need any message protocol, serialization, or plugins. I just want the equivalent of a websocket that lasts forever like I had with Primus.. Unfortunately when I google "persistent websocket" I get a ton of hits telling me how websockets are persistent.

from primus.

lpinca avatar lpinca commented on May 27, 2024

The WebSocket connection is persistent, you just need a reconnection mechanism (and maybe a heartbeat system). There are some wrappers that do this automatically like https://github.com/lukeed/sockette.

from primus.

lpinca avatar lpinca commented on May 27, 2024

I'm closing this as answered. Discussion can continue if needed.

from primus.

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.