seasocks icon indicating copy to clipboard operation
seasocks copied to clipboard

MaxWebsocketMessageSize is hard-coded

Open hoytech opened this issue 7 years ago • 5 comments

If you want bigger inbound messages you need to bump this up in src/main/c/Connection.cpp (and maybe also ReadWriteBufferSize -- dunno I did both), and then recompile library.

hoytech avatar Aug 03 '18 13:08 hoytech

Good point! (wow, how big are your messages!) We should make this configurable though :)

mattgodbolt avatar Aug 03 '18 15:08 mattgodbolt

Hehe usually a lot smaller but in one case about 500 bytes bigger than that limit, which is how I noticed this :)

Outbound messages are sometimes 1M pre-compression and no problems there, this only seems to affect in-bound.

hoytech avatar Aug 03 '18 15:08 hoytech

I also noticed this when trying to send a large text file. For testing I changed ReadWriteBufferSize, MaxWebsocketMessageSize in Connection.cpp to 256 * 1024.

This works for Firefox. Chrome however seems to send chunks for large strings. Presumably setting FIN bit 1 for the first, FIN bit 0 for following and FIN bit 1 for the last one. This however is not supported in HybiPacketDecoder.cpp (Line 46).

A-J-Bauer avatar Dec 03 '18 17:12 A-J-Bauer

What is the state of this? Seasocks hangs for that one connection for me if I try to send too big of a string.

stazio avatar Nov 18 '20 17:11 stazio

You can check out my Pull Request "Support for fragmented Messages" (which I couldn't get thru test insanity) and see if it works for you.

A-J-Bauer avatar Nov 24 '20 18:11 A-J-Bauer