gpt4 book ai didi

ios - 在 Xcode 中连接到服务器时出现错误 "Timed out waiting for the socket to be ready for a write"

转载 作者:行者123 更新时间:2023-11-29 05:43:44 25 4
gpt4 key购买 nike

我正在尝试连接到服务器以进行 Web 套接字连接。但我收到错误:

"Websocket is disconnected: Optional(Starscream.WSError(type: Starscream.ErrorType.writeTimeoutError, message: \"Timed out waiting for the socket to be ready for a write\", code: 0))"

Starscream.WSError(type: Starscream.ErrorType.writeTimeoutError

如何解决?还这是我的源代码链接: https://www.dropbox.com/s/v348vxxjf74dsds/websocket.zip?dl=0

我也尝试在一段时间后再次连接,一旦失败,但仍然给我同样的错误。

最佳答案

我尝试了你的代码,它工作正常。我所做的唯一更改是您的套接字服务器 URL

之前是ws://192.168.1.2:8080

我已经更新了“http://192.168.1.41:8080”//41是我的IP。你可以使用你的

刚刚将 ws 更改为 http

关于ios - 在 Xcode 中连接到服务器时出现错误 "Timed out waiting for the socket to be ready for a write",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56336753/

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