gorilla / websocket

Package gorilla/websocket is a fast, well-tested and widely used WebSocket implementation for Go.

Home Page:https://gorilla.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any size limit/configuration for the JSON written with Conn.WriteJSON or read with Conn.ReadJSON ?

ssmails opened this issue · comments

Describe the problem you're having

A clear and concise description of what the bug is.
Any size limit/configuration on the JSON written with Conn.WriteJSON or read with Conn.ReadJSON ?
https://pkg.go.dev/github.com/gorilla/websocket#Conn.WriteJSON
https://pkg.go.dev/github.com/gorilla/websocket#Conn.ReadJSON

Versions

Go version: go version
1.19

package version: run git rev-parse HEAD inside the repo
github.com/gorilla/websocket v1.5.0

"Show me the code!"

A minimal code snippet can be useful, otherwise we're left guessing!

Hint: wrap it with backticks to format it

SetReadLimit sets the maximum size in bytes for a message read from the peer. This limit applies to messages read through the ReadJSON helper method.

There is not a limit on WriteJSON.

Thank you