gochat icon indicating copy to clipboard operation
gochat copied to clipboard

心跳

Open plum330 opened this issue 4 years ago • 1 comments

客户端和服务端建立websocket连接后,客户端不需要定时给服务端发送心跳吗?

plum330 avatar Apr 10 '21 11:04 plum330

@smallfish-root server有定时发心跳给client,失活的话当前连接会关闭,相应的移除房间中的用户 具体可以搜索下:ticker := time.NewTicker(s.Options.PingPeriod)

LockGit avatar Apr 10 '21 14:04 LockGit