From 3e8fc59213e8567715affb8bff4e398a1f7f7fbc Mon Sep 17 00:00:00 2001 From: mhsanaei Date: Tue, 3 Dec 2024 22:07:58 +0100 Subject: WebSocket: Add heartbeatPeriod --- web/assets/js/model/outbound.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'web/assets/js/model/outbound.js') diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index 83ac4306..c9400efc 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -206,16 +206,23 @@ class KcpStreamSettings extends CommonClass { } class WsStreamSettings extends CommonClass { - constructor(path = '/', host = '') { + constructor( + path = '/', + host = '', + heartbeatPeriod = 0, + + ) { super(); this.path = path; this.host = host; + this.heartbeatPeriod = heartbeatPeriod; } static fromJson(json = {}) { return new WsStreamSettings( json.path, json.host, + json.heartbeatPeriod, ); } @@ -223,6 +230,7 @@ class WsStreamSettings extends CommonClass { return { path: this.path, host: this.host, + heartbeatPeriod: this.heartbeatPeriod }; } } -- cgit v1.2.3