Losing messages

Aug 19, 2011 at 5:14 PM
Edited Aug 19, 2011 at 5:16 PM

Many messages are not detected.

I used a sniffer and many messages are not detected by superwebsocket.

I think that happens when there are too many messages at same time.

:S

Coordinator
Aug 19, 2011 at 5:16 PM

Could you provide some test case and tell me how did you test?

Aug 19, 2011 at 5:34 PM
Edited Aug 26, 2011 at 7:49 AM


Javascript test:
var i = 0;
var int = setInterval(function(){
    conection.send(i);
    i++;
},30);

And server setup:
socket.Setup(new RootConfig(), new ServerConfig{
    Port = 8181,
    Ip = "any",
    MaxConnectionNumber = 10000,
    Mode = SocketMode.Async,
    Name = "server"
}, SocketServerFactory.Instance);

I tried with SocketMode.Sync and Async, and same problem.
I tried local in two machines and Lan, and every time same problem.

Thanks for answer and for make this great library ;-)

UPDATE:
I tried last version (69425) and same problem. 

UPDATE2:
I tried increasing receivedBufferedSize and same problem.

Sep 7, 2011 at 10:57 AM

Anyone know of a solution to this yet?

I also have the same problem when sending several messages at a time, such as:

connection.send("message");
connection.send("another");
connection.send("andanother");

(note, there is not setInterval here as in guepard's example)

Two messages work fine and can be processed by the server, but the third is never received by the websocket server. I can see in Wireshark that it has been sent over the network to the server (targeted for the websocket port).

I'm using the .NET 3.5 edition of SuperWebSocket, the Drop 6 download.

Sep 10, 2011 at 6:11 PM

Ditto the problems described above...we've tracked down our missing messages from clients to the same issue.  Client messages are sent over the wire, but aren't picked up by the SuperWebSocket server.  We've event tried to reduce the OnMessage server event to nothing more than a increment total message counter - so nothing is blocking on that end.  Error log is clean, and info log only shows the command remarks it did actually consume.

I love the library, and think you've done a great job with it.  But for now, I'm going to have to back-burner until you get a chance to investigate a bit.

Coordinator
Sep 11, 2011 at 6:28 AM

I'll add a test case to check this issue today.

Coordinator
Sep 11, 2011 at 6:40 AM

There are two test cases should have covered your case:

WebSocketTest.MessageTransferTest

WebSocketClientTest.SendMessageTest

And they can work correctly, I'll check whether browser do something different with my C# websocket client implementation.

Coordinator
Sep 11, 2011 at 9:15 AM

Hello, everybody here, thank you everyone!

I found the bug and setup new release named as "Drop 7", you can find it on download page.

http://superwebsocket.codeplex.com/releases/view/73174

I also created some new test cases to cover this case.

Sep 17, 2011 at 8:35 PM

Ok, very thanks!!!