go-gorilla的ping pong
业务需求,ping每隔60秒执行一次,ping两次后,没有得到pong的消息,自动切断client。pongTime=180 * time.SecondpingTime=60 * time.SecondreadPump()c.conn.SetReadDeadline(time.Now().Add(pongTime)) c.conn.SetPongHandler(func(string)...