alex-spataru / qMDNS

Implementation of a simple mDNS responder with Qt
MIT License
24 stars 7 forks source link

cannot find Device? #5

Open swiftHao1108 opened 5 years ago

swiftHao1108 commented 5 years ago

this is a nice library ! thanks But i cannot find this service type ("_nanoleafapi._tcp") ;

i use QT , code is below ,

connect(qMDNS::getInstance(), &qMDNS::hostFound,
    this, &screenVideioTrans::onHostFound);
findBob();

void screenVideioTrans::findBob() { qMDNS::getInstance()->lookup("_nanoLeafapi._tcp"); }

void screenVideioTrans::onHostFound(const QHostInfo& info) { //qDebug() << "Bob is at" << info; qDebug() << "Bob is at" ;

const auto addresses = info.addresses();
    qDebug() << "Found address:" << addresses;

}

Found address: i cannot get _nanoleafapi._tcp , this ip address