-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support server initiated heartbeats
Before this change the websocket server would not have any heartbeat mechanism, this meant that unless the client proactively implements heartbeats the server would close the connection. From what I have seen most non-browser clients do not implement heartbeats (e.g filebeat, websocat), thus for those clients the connection would have been closed in 65 seconds. The Websocket RFC does not set out a requirement which side should initiate heartbeats or that they are required. Most browsers have implemented heartbeats from client side, however it is not a must thus, in my opinion it is beneficial for the server to implement them, especially if the server closes connection if heartbeat is not received. As a consequence this changeset allows to support clients which aren't browsers.
- Loading branch information
Showing
2 changed files
with
42 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters