Limitations for send size?

Jan 28, 2015 at 10:42 AM

I was playing around with the example files and run the example server B-Subprotocol, where I added
public class XMLPrices : SubCommandBase
    public override void ExecuteCommand(WebSocketSession session, SubRequestInfo requestInfo)
        session.Send("Received prices");
I used the Test.html file, which was in the B-SubProtocol project.
When I send "XMLPrices hello how are you" all is well.

als the content
"XMLPrices <?xml version="1.0"?>
<book id="bk101">
  <author>Gambardella, Matthew</author>
  <title>XML Developer's Guide</title>
  <description>An in-depth look at creating applications 
  with XML.</description>
<book id="bk102">
  <author>Ralls, Kim</author>
  <title>Midnight Rain</title>
  <description>A former architect battles corporate zombies, 
  an evil sorceress, and her own childhood to become queen 
  of the world.</description>

fine as well. But when the content is sized up over about 1015 characters, the connection is closed (seems to be on the client side, 'cause the server doesn't receive anything).

here's an example of content I was able to send, but if you add one character, connection is closed.

"XMLPrices Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam qu"

I noticed on it is possible to send larger size content. How can I get it working with the html / javascript provided? Why does it seem that it has limitations?
Kind regards,

Jan 28, 2015 at 10:56 AM
Edited Jan 28, 2015 at 11:01 AM
Seems connection is closed by server. In line 528 in file "WebSocketSession.cs" in the "SuperWebSocket" project, the reason for close is ProtocolError.
How can I avoid this?
Jan 29, 2015 at 4:13 PM
var s = new ServerConfig();
s.Name = "SuperWebSocket";
s.Ip = "Any";
s.Port = 2012;
s.Mode = SocketMode.Tcp;
s.MaxRequestLength = 10000000; //<<===== this helped

//Setup the appServer