c++ - Windows 10 物联网树莓派 2 Tcp 连接 c++

标签 c++ windows tcp iot windows-10-iot-core

我已经编写了服务器/客户端应用程序。在 raspberry pi2 和 windows PC 之间。(Raspi 是服务器)。如果我将服务器和客户端程序都放在 raspberry pi2 上然后它工作,但是当客户端从 Windows pc 运行时我无法连接,出现错误超时(10060)。我只是通过交换机连接 pc 和 pi2,我的 PC 的防火墙被禁用。 我的示例代码与windows相同https://msdn.microsoft.com/en-us/library/windows/desktop/ms737889(v=vs.85).aspx

谢谢你的时间

最佳答案

我找到了解决方案。我们需要为 Windows 10 物联网添加防火墙规则。

喜欢: netsh advfirewall firewall add rule name="Open Port 80"dir=in action=allow protocol=TCP localport=80

关于c++ - Windows 10 物联网树莓派 2 Tcp 连接 c++,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31982977/

相关文章:

C++ : terminate called after throwing an instance of 'std::bad_alloc' while computing length of big strings

c++ - : public after struct mean? 是什么

c++ - 在运行时获取/设置模板结构的静态成员

windows - 在 DLL 中,函数表的结构是怎样的?

java - 如何解压缩/解密原始 TCP 数据?

c++ - 从类型 'const char*' 到类型 '__FlashStringHelper*' 的 reinterpret_cast 丢弃限定符

windows - cygwin 中的 vim 病原体错误

java - ./mvnw spring-boot :run command displays "Spring was unexpected this time" message

ios - iOS 上的 ICMP 与 TCP 协议(protocol)

tcp - 对 Read trait 如何为 TcpStreams 工作的误解