gpt4 book ai didi

java - WebSocket 的 ClientEndpoint 接收数据的顺序是否与 ServerEndpoint 发送的顺序相同?

转载 作者:行者123 更新时间:2023-11-28 23:28:06 28 4
gpt4 key购买 nike

我在循环中使用 RemoteEndpoint.AsyncsendText() 方法将一些数据发送到 ClientEndPoint。由于数据是从 ServerEndpoint 异步发送的,因此 ClientEndpoint 会按照发送时的相同顺序接收数据吗?

最佳答案

没有必要。始终有 channel 线程在单个连接上将数据传输到 websocket 上的客户端。数据可以按任何顺序出现。虽然会尽快尝试传送数据,但可能会出现竞争条件。

关于java - WebSocket 的 ClientEndpoint 接收数据的顺序是否与 ServerEndpoint 发送的顺序相同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34394079/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com