imx6dl開發板,linux4.9+qt5.8環境,呼叫joinMulticastGroup回傳false,列印的socket->error()是QAbstractSocket::UnknownSocketError。 以下是代碼。有人知道回傳false的原因嗎? bool result = false; m_udpsocket_recive = new QUdpSocket(this); QHostAddress mcast_addr("224.0.0.17"); result = m_udpsocket_recive->bind(QHostAddress::AnyIPv4,45454, QUdpSocket::ReuseAddressHint); qDebug()<<"Phone_Init1 result"<<result; qDebug()<<"Phone_Init1 "<<m_udpsocket_recive->error(); qDebug()<<"Phone_Init1 "<<m_udpsocket_recive->state(); result = m_udpsocket_recive->joinMulticastGroup(mcast_addr); qDebug()<<"Phone_Init result"<<result; qDebug()<<"Phone_Init "<<m_udpsocket_recive->error(); qDebug()<<"Phone_Init "<<m_udpsocket_recive->state(); connect(m_udpsocket_recive, SIGNAL(readyRead()),this, SLOT(RecvDateSlot()));
uj5u.com熱心網友回復:
系結的時候不需要給resultuj5u.com熱心網友回復:
樓主找到解決辦法了嗎?轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/94993.html
標籤:其他技術討論專區
