在 ad hoc 网络上时出现超时错误

发布于 2024-07-07 02:56:03 字数 571 浏览 9 评论 0原文

我正在对恰好在 iPhone 上运行的 FTP 服务器进行 InternetConnect (Wininet)。 当用户使用正常的 WiFi 网络时,它可以正常工作。 当他的 iPhone 具有临时网络时,他会收到 ERROR_INTERNET_TIMEOUT。 我认为这是某种路由问题。 我很好奇为什么会出现 ERROR_INTERNET_TIMEOUT 而不是 ERROR_INTERNET_CANNOT_CONNECT。 大多数用户,如果被防火墙等阻止,将收到 ERROR_INTERNET_CANNOT_CONNECT。

我对低级 TCP/IP 的了解还不够,无法理解哪种情况会导致超时错误而不是连接错误。 我对理解这一点的好奇心比实际解决用户问题的好奇心更大。 ;-) 谁能解释一下网络数据包发生了什么(越详细越好)?

编辑: 请注意,据我所知,用户没有启用传出防火墙,这不是防火墙问题。 我认为这是某种路由问题。 当用户连接 VPN 并且他们的路由设置不正确并且所有数据包都发送到他们的工作而不是 iPhone 时,我也遇到过类似的问题。 我想知道在这种情况下数据包发生了什么:套接字已连接,但在下一步(无论是什么)它们无法通信。

I am doing an InternetConnect (Wininet) to an FTP server that happens to be running on an iPhone. When the user is on a normal WiFi network it works fine for him. When he has an ad hoc network with his iPhone he gets an ERROR_INTERNET_TIMEOUT. I presume this is some kind of routing problem. I am curious as to why this gets ERROR_INTERNET_TIMEOUT and not ERROR_INTERNET_CANNOT_CONNECT. Most users, if they are blocked by, for example, a firewall, will get ERROR_INTERNET_CANNOT_CONNECT.

I don't understand enough about low-level TCP/IP to understand what kind of situation would cause a timeout error instead of a connect error. I'm really more intellectually curious in understanding this than I am in actually solving the user's problem. ;-) Can anyone explain what is happening with the network packets (the more detailed the better)?

edit:
note that, as far as I know, the user doesn't have an outgoing firewall enabled, it's not a firewall issue. I think it's some kind of routing issue. I have seen similar issues when a user is connected a VPN and their routing is set up incorrectly and all packets go to their work instead of the iPhone. I want to know what's going on with the packets in this situation: the socket connects but at the next step (whatever that is) they can't communicate.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

画中仙 2024-07-14 02:56:03

现在的防火墙选择根本不响应它们认为可疑的数据包,这是为了防止端口扫描器检测到该 IP 上有一台机器。 因此,这可能就是您的情况所发生的情况,防火墙可能只是丢弃数据包并导致超时,而不是连接失败错误。

Firewalls these days choose to not respond at all to packets that they deem suspicious, this is to prevent port scanners from detecting that there is a machine at the IP. So that could be what is happening in your case, the firewall may simply be dropping the packet and causing a timeout rather than a failure to connect error.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文