wisefree
V2EX  ›  Qt

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

  •  
  •   wisefree · Mar 5, 2022 · 3640 views
    This topic created in 1530 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   ·   3017 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:19 · PVG 23:19 · LAX 08:19 · JFK 11:19
    ♥ Do have faith in what you're doing.