yangheng4922
V2EX  ›  Node.js

局域网下不同网段的两台设备无法通过 UDP 通讯

  •  
  •   yangheng4922 · Apr 19, 2021 · 1874 views
    This topic created in 1862 days ago, the information mentioned may be changed or developed.
    需要找到局域网内能访问到的设备 现在的方案是 循环 pin 192.168.0.1~255 只能找到同网段的

    如果想要不同网段的 那就需要 255*255 = 65025 需要 6 万多次

    后来尝试使用 创建 UDP 来通讯 测试下来 同网段可以连接通讯 跨网段就不行了

    组播啥的 都试过 也不行
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4590 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 71ms · UTC 04:06 · PVG 12:06 · LAX 21:06 · JFK 00:06
    ♥ Do have faith in what you're doing.