OpCode & MaxReceiveFrameLength

Jan 14, 2014 at 9:14 PM

I am using this websocket client on .Net. I have encountered 2 issues while integrating it to my project. first issue is in SendData Function, the WSFrameType (opCode) is set to "WSFrameType.Binary", it should be set to "WSFrameType.Text" in order to send textual data to server.
And secondly there is a limit set for receiving packet, which is hardcoded to 1024. Now even if the server sends the data in chunks of 1024 each, the code will break and WebSocket will be disconnected. i have set the limit to 32768 because I am getting large data sets from server.

Rest the code is really awesome and helpful. I just had to add the code in my solution, add references and i was ready to use websockets.

Feb 13, 2014 at 5:21 PM
Hi Atif,

Thanks for using my websocket library!

I have two functions: SendText and SendData. The first is for sending textual data the second is for binary data.

You can change the receive size by setting WSOptions.MaxReceiveFrameLength to whatever you want, and then passing it in to the WebSocketClient constructor.