WebSocket4Net
WebSocket4Net copied to clipboard
Stack overflow (Silverlight 5)
WebSocket4Net is great - and thanks for continuing to support Silverlight for those of us that are stuck with it!
So far everything is working great except for a fairly regular stack overflow. Seems to happen when receiving a stream of 10Kb packets from the server?
Sorry for my later response. Your stacktrace file is really useful.
I'll try to figure this issue out.
Yes, it is caused by the package is too big and the underlying crypto library cannot handle this situation very well. It could be relieved by increasing the receive buffer size, but WebSocket4Net doesn't support it for now.
I'll add this feature pretty soon, but you still need wait a while if you want to get this enhancement through NuGet.
Try this new constructor parameter receiveBufferSize. https://github.com/kerryjiang/WebSocket4Net/commit/cc97795e068a2821b0477c968c18ef73daae48da
Hi Kerry,
Thanks for looking into this. I tried the new constructor parameter and set the receiveBufferSize to larger than the largest data packet that we will be receiving. Unfortunately, I still get the stack overflow.
Here is another stack trace, it probably won't tell you anything new, but you never know :) stacktrace2.txt
@DaveW-Enc / @kerryjiang Any update on this? I'm facing the same issue and I've also increased the ReceivedBufferSize to double of the biggest message.
I haven’t heard anything since sending the second stack trace.
We had to remove WebSocket4Net and go with a commercial product instead.