【发布时间】:2013-02-23 01:09:36
【问题描述】:
我正在使用 BOOST-ASIO 进行简单的回显 client-server(客户端和服务器有单独的链接)。当我尝试运行服务器时,我使用这个async_tcp_echo_server 4000。对于客户端,我使用blocking_tcp_echo_client #.#.#.# 4000(以#.#.#.# 作为IP 地址)。我在 XP-SP3 上,我的计算机使用 USB 卡连接到我的无线 dsl 调制解调器。在客户端几秒钟后,我收到此错误:
Exception: connect: A connection attempt failed because the connected party did
not properly respond after a period of time, or established connection failed be
cause connected host has failed to respond
有什么想法吗?我关闭了包括 Windows 防火墙在内的防火墙,但仍然没有任何响应。我的端口可能在不正确的范围内吗?我是否需要包含计算机名称来指定网络上的机器(网络上有时还有其他机器处于活动状态)?我确实尝试在另一台直接连接到 dsl 调制解调器的计算机上运行它,但同样的问题。我确实ping了我的地址,并且确实适用于4/4个数据包。
【问题讨论】:
标签: client-server boost-asio connectivity