I am using roStreamSocket. I figured out there is some inner limitation probably timing. On Roku Stick I am able to send up to 131,072 characters over socket, if send one more character connection will be closed, rest of application continue regularly after connection close but it's not able to send it. I test it on newer device Roku Ultra and it's also reproducible but with higher limit it's over 800,000 characters, didn't try to figure out exact number, this is hard to reach to me but still could be possible to have a problem with this limit.
I know it seems a big numbers but it doesn't I am using it for communication based on JSON format, not a binary data which actually also might be possible to send over it.
I tried to send 131073 characters with one frame with 131073 size or separate it into many smaller with 1024 limitation or 126 to be in roStreamSocket?
NOTE: you can see that lib has observers in init instead on run function, I tried to switch it but didn't helped, still same.