add qq oauth2 login

This commit is contained in:
landaiqing
2024-08-19 23:10:15 +08:00
parent 08b2790bee
commit 1094957ea4
16 changed files with 884 additions and 78 deletions

View File

@@ -14,9 +14,11 @@ const (
HeartbeatWaitTimeout = 10 * time.Second // 心跳等待超时时间
)
var Handler = NewWebSocket()
func (WebsocketAPI) NewGWSServer(c *gin.Context) {
var handler = NewWebSocket()
upgrader := gws.NewUpgrader(handler, &gws.ServerOption{
upgrader := gws.NewUpgrader(Handler, &gws.ServerOption{
HandshakeTimeout: 5 * time.Second, // 握手超时时间
ReadBufferSize: 1024, // 读缓冲区大小
ParallelEnabled: true, // 开启并行消息处理