I am developing an application that uses gorilla/websocket framework on the serverside. I have an unusual use-case in which the front-end sends to the back-end a 6.8 MB json. I am receiving the following error:
websocket: close 1009 (message too big): Frame size of 3036066 bytes exceeds maximum accepted frame size.
I tried calling the following function on the connection but it doesn't solve the problem:
// SetReadLimit sets the maximum size for a message read from the peer. If a
// message exceeds the limit, the connection sends a close message to the peer
// and returns ErrReadLimit to the application.
func (c *Conn) SetReadLimit(limit int64) {
c.readLimit = limit
}
If I am not mistaken, this sets the maximum accepted size for a message, not for a frame, that's why the problem still persists. Do you know any similar way to set the read limit for a frame, so that my 6.8 MB will be accepted by the server?