feat: implement server-initiated heartbeat in msgGateway module (#2404)

* feat: implement send ping msg when platform is web in gateway.

* add context life cycle control.

* feat: implement heartbeat logic in msggateway.

* update heartbeat logic.

* update to correct method name and comment.

* update initiate heartbeat logic.

* rename ws_server

* update writePingMsg logic

* update log level to warn.
This commit is contained in:
Monet Lee
2024-07-10 15:48:12 +08:00
committed by GitHub
parent 213613cf54
commit 28898f5b79
4 changed files with 58 additions and 1 deletions
+2 -1
View File
@@ -16,10 +16,11 @@ package msggateway
import (
"encoding/json"
"github.com/openimsdk/tools/apiresp"
"net/http"
"time"
"github.com/openimsdk/tools/apiresp"
"github.com/gorilla/websocket"
"github.com/openimsdk/tools/errs"
)