wisefree
V2EX  ›  Qt

QUdpSocket bind 特定的本地 ip,无法发送数据?

  •  
  •   wisefree · Mar 5, 2022 · 7556 views
    This topic created in 1691 days ago, the information mentioned may be changed or developed.

    windows 10 Qt 5.12.10

    创建一个 QUdpSocket ,bind 一个本地的 IP 如 192.168.1.200 ,结果用 writeDatagram 无法发送数据。

    1. 不进行 bind ,writeDatagram 可以发送数据
    2. 不绑定特定 ip ,bind QHostAddress::AnyIPv4 ,可以发送数据

    大家遇到过这个问题吗?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5497 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 06:03 · PVG 14:03 · LAX 23:03 · JFK 02:03
    ♥ Do have faith in what you're doing.