草庐IT

readLimit

全部标签

gorilla /websocket 设置读取限制?

//SetReadLimitsetsthemaximumsizeforamessagereadfromthepeer.Ifa//messageexceedsthelimit,theconnectionsendsaclosemessagetothepeer//andreturnsErrReadLimittotheapplication.func(c*Conn)SetReadLimit(limitint64){c.readLimit=limit}极限的单位是什么?知识库?MB? 最佳答案 基于gorilla/websocket的来源,以