WebSocket 的 ClientEndpoint 接收数据的顺序是否与 ServerEndpoint 发送的顺序相同?
Does WebSocket's ClientEndpoint receive data in the same order it was sent by the ServerEndpoint?
我在循环中使用 RemoteEndpoint.Async
的 sendText()
方法将一些数据发送到 ClientEndPoint
。由于数据是从 ServerEndpoint
异步发送的,ClientEndpoint
会按照发送时的相同顺序接收数据吗?
没有必要。始终有通道线程在单个连接上将数据传输到 websocket 上的客户端。数据可以在任何 order.Although 尝试中传输,但可能会出现竞争条件。
我在循环中使用 RemoteEndpoint.Async
的 sendText()
方法将一些数据发送到 ClientEndPoint
。由于数据是从 ServerEndpoint
异步发送的,ClientEndpoint
会按照发送时的相同顺序接收数据吗?
没有必要。始终有通道线程在单个连接上将数据传输到 websocket 上的客户端。数据可以在任何 order.Although 尝试中传输,但可能会出现竞争条件。