dart-lang / web_socket_channel

StreamChannel wrappers for WebSockets.
https://pub.dev/packages/web_socket_channel
BSD 3-Clause "New" or "Revised" License
412 stars 107 forks source link

Message received in wrong order #346

Open Oskar888 opened 2 months ago

Oskar888 commented 2 months ago

This happened to me: there were problems with the Internet on the client side, specifically the connection speed dropped significantly and at times the connection was completely broken, but briefly enough that the WebSocket connection was not closed. However, the problem is that the messages coming from the server were delivered in the wrong order. To be more precise, they all arrived at exactly the same time, so I think their order was mixed up, which caused a problem with the application. The WebSocket technology itself works based on TCP, which should guarantee the correct order of received messages, so it seems to me that the problem is with the WebSocket implementation in the Dart language, and more specifically with this library.