When using websockets I noticed some message loss. I am trying to communicate between mobile safari (client) and c#(server). I am using superWebSocket (opensource) as a server, so it might be a server bug…
But the messages are only dropped when the connection is congested (When I send alot of messages). This “reaks” of UDP to me, but I remember reading somewhere that web-sockets are TCP.
Is there any occasion where I might issue a “send” command in javascript, and the receiving side does not get the message?
I’ve been using WebSockets extensively in with high traffic applications and in situations where a single lost message (in either direction) is fatal. I’ve never seen any messages lost, ever. However, I do recall seeing a post or question somewhere about the same issue and that person was also using superWebSocket for the server. So my strong suspicion is that there is a bug in superWebSocket.
Do you see the same problem if you use a non-mobile browser? It’s possible the iOS brower (I assume that’s what you mean by mobile Safari) has a WebSocket bug. I’ve not extensively tested that browser with WebSockets. I have extensively tested Chrome, Firefox (with WebSocket enabled), and Opera (with WebSocket enabled) on Linux and Windows and Safari on Windows.
There is no occasion where a send in Javascript is allowed to not reach the server except if the whole connection fails. If that is happening then there is a bug somewhere.