wisefree
V2EX  ›  Qt

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

  •  
  •   wisefree · Mar 5, 2022 · 4135 views
    This topic created in 1550 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   ·   Solana   ·   1153 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 17:58 · PVG 01:58 · LAX 10:58 · JFK 13:58
    ♥ Do have faith in what you're doing.