Comments (5)
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.
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.
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.
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.
Implemented by #88
from cloak.
Related Issues (20)
- Add license to NPM package
- Update chat example to use Cloak 0.2.0
- Make Socket.io an optional dependency
- Lobby.pulse not firing HOT 1
- Trying to run grow21 example throws this error HOT 6
- Example how to use a Timer HOT 5
- misleading output when running cloak with `express` parameter HOT 2
- Missing tarball when downloading from npm. HOT 6
- Configuring socket.io HOT 5
- Document new ability to add socket.io options to client.run HOT 1
- Client configuration passed to server during initial connection? HOT 5
- Create a new game room HOT 2
- Notifications about client connection lifecycle on server
- No issue but cry for help HOT 6
- Android API
- config.lobby.newMember invoked before config.clientEvents.begin? HOT 5
- client-side cloak.running? HOT 1
- Room seems to be ignoring its size HOT 1
- Maintenance HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloak.