Giter VIP home page Giter VIP logo

Comments (5)

incompl avatar incompl commented on June 30, 2024

Does it work to do this?

cloak.run('http://localhost:8090', {
  'socket.io': {
    'heartbeat interval': 123,
    'heartbeat timeout', 456
  }
});

If so, I will update the documentation at https://github.com/incompl/cloak/wiki/ClientConfiguration accordingly.

from cloak.

vstirbu avatar vstirbu commented on June 30, 2024

The option for controlling the heartbeat on the client that I found in the socket.io documentation that works with cloak is the following:

cloak.run(url, {
   'socket.io': {
      heartbeatTimeout: 10000 // the value in ms
   }
});

However I'm not that familiar with how socket.io handles the heartbeat and if you can control the server behaviour from the client.

from cloak.

incompl avatar incompl commented on June 30, 2024

I'm not clear on the details (seems like heartbeat settings are not in the latest version of Socket.io so they weren't in the documentation anymore) but I found this on Stackoverflow:

By default, a Socket.IO client will send a heartbeat to the server every 15 seconds (heartbeat timeout), and if the server hasn't heard from the client in 20 seconds (heartbeat interval) it will consider the client disconnected.

from cloak.

vstirbu avatar vstirbu commented on June 30, 2024

There is also this in the documentation on migrating to 1.x.

BTW, I have this branch with cloak running over socket.io 1.x, but don't know yet how to handle the heartbeat issue before making a PR.

from cloak.

incompl avatar incompl commented on June 30, 2024

Implemented by #88

from cloak.

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.