olahol / melody

:notes: Minimalist websocket framework for Go
BSD 2-Clause "Simplified" License
3.76k stars 365 forks source link

Help request: How can I increase websocket read limit? #69

Closed UedaTakeyuki closed 2 years ago

UedaTakeyuki commented 2 years ago

I can't receive big (about 1Kbyte) data with the following error:

websocket: read limit exceeded

How can I configure my Melody to inclease this limit? Thank you for your help!

FZambia commented 2 years ago

@UedaTakeyuki hi, see https://github.com/olahol/melody/blob/master/session.go#L109 - so you can increase read limit with MaxMessageSize (512 byte by default).

Please note that this package seems unmaintained for a long time. My advice – switch to sth else if you are just starting your project. Or be ready to fork/learn the internals.

UedaTakeyuki commented 2 years ago

Thank you FZambia!

I can success to read big data.