This project is read-only.

Possible Issue with Large Data

Jul 14, 2014 at 7:12 PM
I have a WebSocket Server that I can hit from a browser and get valid messages that parse JSON correctly. These messages are large, about 9K, and when looking at Google Chome Developer Tools I can see that its coming in multiple frames.

Now, I've been trying to hit the same service from a console application using WebSocket4Net. The smaller messages come across fine, but my larger messages are getting messed up. Basically, at the point where the Chrome Developer Tools are showing me where the initial frame ends, I'm getting the start of the next actual message, not the continuation frame.

I'm seeing some funny characters when looking at the HEX, at the point of the message truncation...seeing (HEX) 80 7e 06 15 .... or something close, but it always begins with '80 7e'.

I've increased the ReceiveBufferSize to 12,000, but that doesn't seem to help.

Anybody else ever see this? Thanks.
Aug 13, 2014 at 4:44 PM
Update - Just presenting some findings on this one.

I wanted to see if the problem was the WebSocket server or this client plug-in. I created a Windows 8 VM and created a new application using the MS WebSocket Client classes (only works in Windows 8 or Server 2012 - VERY frustrating). It works. I followed some code that I found and it was able to gather multiple frames of data and piece them back together to create a valid message.

So looking at what was happening in WebSocket4Net, it seems that it gets the first part of the message (about 7000 bytes) and it realizes that it does not have an End-Of-Message flag. So it goes to get the next data frame to append to the original, but it seems to be getting the first frame of the next actual package and it then appends that. It keeps this process up until it actually gets a message that only contains one frame with an EOM flag set. It then returns that data to as the WebSocket data, however, the data is invalid.

Just thought I'd add some information. Was hoping to get some information on this and maybe a possible fix as Windows 8 or Server 2012 are not viable options for me.
Sep 15, 2014 at 9:10 PM
Just an FYI...this has been fixed. Check it out here. (
Marked as answer by MSchumacker67 on 9/15/2014 at 1:10 PM