The received message is lost in the middle section

May 6, 2014 at 8:34 AM
Edited May 6, 2014 at 8:49 AM
successfully connect to the java websockect server.

When I send about 30 data, received message is correct.

But I sent about 200 data, the received message is not complete.
The message is the JSON string, but missing middle section.

I have no idea to deal with this problem...

Using C# 3.5 .Net framework

Thanks!
Coordinator
May 6, 2014 at 8:40 AM
Which server are you using?
May 6, 2014 at 8:49 AM
Java websocket

I tested with a html5 as client, received message is correct
Coordinator
May 6, 2014 at 9:19 AM
Which api are you using in your client?
May 6, 2014 at 9:31 AM
Edited May 6, 2014 at 9:34 AM
I released the WebSocket4Net.Net35.csproj in WebSocket4Net directory
so my Project using the WebSocket4Net.dll、SuperSocket.ClientEngine.Common.dll、SuperSocket.ClientEngine.Core.dll and SuperSocket.ClientEngine.Protocol.dll
Coordinator
May 6, 2014 at 9:53 AM
Change the question: how do you use the websocket4net to receive message?
May 6, 2014 at 10:13 AM
Edited May 6, 2014 at 10:22 AM
I first initialize WebSocket
code:
            websocket = new WebSocket("ws://127.0.0.1:9000/WebSocketServlet");
            websocket.AllowUnstrustedCertificate = true;
            websocket.EnableAutoSendPing = false;
            websocket.Opened += new EventHandler(websocket_Opened);
            websocket.Error += new EventHandler<SuperSocket.ClientEngine.ErrorEventArgs>(websocket_Error);
            websocket.Closed += new EventHandler(websocket_Closed);
            websocket.MessageReceived += new EventHandler<MessageReceivedEventArgs>(websocket_MessageReceived);
            websocket.ReceiveBufferSize = 60240;
            websocket.NoDelay = true;
            websocket.Open();
then use the websocket_MessageReceived to receive message.

but I found the receive message was not complete in WebSocket4Net.dll already.

so I debug the code , the receive message was already lost in OnDataReceived in WebSocket4Net\WebSocket.cs.

hi kerry:

Is that any errors in my init WebSocket?

Thanks
May 8, 2014 at 7:42 AM
Edited May 8, 2014 at 7:43 AM
hi kerry:
do you know that, about the lost message?


Thanks!
Coordinator
May 8, 2014 at 7:48 AM
Which version of WebSocket4Net are you using?
May 8, 2014 at 7:56 AM
WebSocket4Net.dll version : 0.9.0.0


Thanks
Coordinator
May 8, 2014 at 8:31 AM
Where did you get it?
May 8, 2014 at 8:35 AM
I downloaded from github.

https://github.com/kerryjiang/WebSocket4Net

Thanks
May 23, 2014 at 8:10 AM
Edited May 30, 2014 at 2:20 AM
Hi kerry:

How about the problem?

I have no way to solve this.

Thanks
Coordinator
May 23, 2014 at 8:13 AM
If you can write a unit test project to demonstrate the issue, it would be helpful for me to figure it out.
May 27, 2014 at 11:48 AM
Edited May 30, 2014 at 2:21 AM
Hi kerry, I had send the data source and client demo to your email.