mattgodbolt / seasocks

Simple, small, C++ embeddable webserver with WebSockets support
BSD 2-Clause "Simplified" License
735 stars 119 forks source link

MaxWebsocketMessageSize is hard-coded #93

Open hoytech opened 6 years ago

hoytech commented 6 years ago

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.

mattgodbolt commented 6 years ago

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

hoytech commented 6 years ago

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.

A-J-Bauer commented 5 years ago

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).

stazio commented 3 years ago

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

A-J-Bauer commented 3 years ago

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.