-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control io heartbeat interval and timeout via server configuration #86
Comments
Does it work to do this?
If so, I will update the documentation at https://github.com/incompl/cloak/wiki/ClientConfiguration accordingly. |
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. |
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:
|
Implemented by #88 |
I would like to be able to configure the interval and the timeout of the underlying socket.io to accommodate scenarios with stricter requirements than the default values.
I have noticed that there is an undocumented configuration option
logLevel
that allows controlling the socket.io logging behaviour: https://github.com/incompl/cloak/blob/master/src/server/cloak/index.js#L93However, I have noticed also #69 where the idea is not to have socket.io specific configurations.
So, what do you say about extending the server configuration with socket.io specific parameters, although heartbeat is not particularly tight to the specific transport...
My quick and dirty proposal is to add
right after
logLevel
.The text was updated successfully, but these errors were encountered: